@bernierllc/docs-generator
v0.3.2
Published
Service package orchestrating documentation core packages for complete site generation with build optimization and theme management
Readme
@bernierllc/docs-generator
Service package orchestrating documentation core packages for complete site generation with build optimization and theme management.
Installation
npm install @bernierllc/docs-generatorUsage
import { DocsGenerator } from '@bernierllc/docs-generator';
const generator = new DocsGenerator();
// Generate a complete documentation site
const result = await generator.generateSite({
source: './docs',
output: './dist',
theme: 'default',
pages: [
{
path: '/index.html',
title: 'Home',
content: '# Welcome\n\nThis is the documentation site.'
},
{
path: '/guide.html',
title: 'User Guide',
content: '# Guide\n\nDetailed user guide.'
}
],
assets: [
{
type: 'css',
source: './styles/main.css'
}
]
});
console.log(`Build completed: ${result.pages.length} pages generated`);API Reference
Core Functions
generateSite(config)- Generate complete documentation sitebuildPage(page, options?)- Build a single pagebuildNavigation(pages)- Generate site navigation structureprocessAssets(assets)- Process and optimize assetsloadTheme(themeName, options?)- Load and configure themestartBuild(config)- Start asynchronous build job
Job Management
getBuildStatus(jobId)- Get build job statusgetBuildProgress(jobId)- Get detailed build progresscancelBuild(jobId)- Cancel running build job
Features
- Site Generation - Complete documentation site building
- Asset Management - CSS, JS, image, and font processing
- Theme Support - Customizable themes with templates
- Build Optimization - Parallel processing and caching
- Progress Tracking - Real-time build progress monitoring
- Error Handling - Comprehensive error reporting and recovery
Dependencies
@bernierllc/markdown-renderer- Markdown processing@bernierllc/design-token-parser- Design token processing@bernierllc/template-engine- Template rendering@bernierllc/file-handler- File operations@bernierllc/retry-policy- Retry logic for build failures
License
Copyright (c) 2025 Bernier LLC. All rights reserved.
