UNPKG

rp-markdown-docs

Version:

A modern, beautiful documentation generator that converts markdown files into interactive HTML documentation sites

39 lines 1.66 kB
#!/usr/bin/env node import { Command } from 'commander'; import { generateDocs } from './commands/generate.js'; import { serveDocs } from './commands/serve.js'; import { initProject } from './commands/init.js'; import { buildDocs } from './commands/build.js'; const program = new Command(); program .name('rp-markdown-docs') .description('A modern documentation generator for markdown files') .version('1.0.8'); program .command('init [directory]') .description('Initialize a new documentation project') .option('-t, --template <template>', 'Template to use (default, minimal, advanced)', 'default') .action(initProject); program .command('generate [input]') .description('Generate HTML documentation from markdown files') .option('-o, --output <directory>', 'Output directory', './docs') .option('-c, --config <file>', 'Configuration file', './mdocs.config.js') .option('-w, --watch', 'Watch for file changes') .option('--base-url <url>', 'Base URL for the site', '/') .action(generateDocs); program .command('build [input]') .description('Build production-ready documentation') .option('-o, --output <directory>', 'Output directory', './dist') .option('-c, --config <file>', 'Configuration file', './mdocs.config.js') .option('--base-url <url>', 'Base URL for the site', '/') .action(buildDocs); program .command('serve [directory]') .description('Serve documentation locally') .option('-p, --port <port>', 'Port to serve on', '3000') .option('-o, --open', 'Open browser automatically') .action(serveDocs); program.parse(); //# sourceMappingURL=index.js.map