firedoc
Version:
API Doc generator rewritten from [YUIDoc](https://github.com/yui/yuidoc). We use this tool to document a large JavaScript game engine [Fireball](http://github.com/fireball-x/fireball) at [docs-zh.fireball-x.com/api](http://docs-zh.fireball-x.com/api/) and
24 lines (20 loc) • 628 B
JavaScript
var program = require('commander');
var meta = require('../package.json');
var spawn = require('child_process').spawn;
program
.version(meta.version)
.command('build [path]', 'build document from the directory')
.command('install [path]', 'install theme or plugin')
.command('preview [path]', 'build and preview the document from directory')
.parse(process.argv);
if (!/(build|install|preview|help)/.test(process.argv[2])) {
spawn(
process.argv[1], // firedoc
['build'].concat(process.argv.slice(2)), // arguments
{
'stdio': 'inherit',
'env': process.env
}
);
}