react-tsdoc
Version:
CLI to extract information from React Typescript component files with TSDoc for documentation generation purposes
24 lines (21 loc) • 499 B
JavaScript
const parser = require('../lib/parser').default;
require('yargs')
.scriptName('react-tsdoc')
.usage('$0 [args]')
.command('$0 <path> [output]', 'Run the docgen', (yargs) => {
return yargs.positional('path', {
describe: 'file or files to parse',
type: 'string'
});
}, function (argv) {
parser(argv.path, argv.output, true);
})
.option('output', {
alias: 'o',
type: 'string',
description: 'The file to write to'
})
.help()
.demandCommand(1)
.parse();