Added option -D to dump the doclets to console and quit, possibly useful for debugging?

This commit is contained in:
Michael Mathews 2011-01-07 12:26:21 +00:00
parent bb873696d0
commit b96fc0f6e6
2 changed files with 11 additions and 7 deletions

View File

@ -154,9 +154,11 @@ function main() {
require('jsdoc/src/handlers');
docs = app.jsdoc.parser.parse(sourceFiles, env.opts.encoding);
//print('dumping docs...');
//dump(docs);
//exit(0);
if (env.opts.dump) {
dump(docs);
exit(0);
}
env.opts.template = env.opts.template || 'default';

View File

@ -19,14 +19,16 @@
argsParser.addOption('t', 'template', true, 'The name of the template to use. Default: the "default" template');
argsParser.addOption('e', 'encoding', true, 'Assume this encoding when reading all source files. Default: your system default encoding');
argsParser.addOption('n', 'nocode', false, 'Ignore doclets that don\'t explicitly provide a symbol name.');
argsParser.addOption('T', 'test', false, 'Run unit tests and quit.');
argsParser.addOption('d', 'destination', true, 'The path to the output folder. Use "stdout.json" or "stdout.xml" to dump data to the console. Default: ./jsdocs');
argsParser.addOption('T', 'test', false, 'Run all tests and quit.');
argsParser.addOption('d', 'destination', true, 'The path to the output folder. Use "console" to dump data to the console. Default: console');
argsParser.addOption('V', 'validate', false, 'Validate the results produced by parsing the source code.');
argsParser.addOption('r', 'recurse', false, 'Recurse into subdirectories when scanning for source code files.');
argsParser.addOption('h', 'help', false, 'Print this message and quit.');
argsParser.addOption('D', 'dump', false, 'Dump all found doclet internals to console and quit.');
// TODO [-R, recurseonly] = a number representing the depth to recurse
// TODO [-f, filter] = a regex to filter on
// TODO [-f, filter] = a regex to filter on <-- this can be better defined in the configs?
/**
Set the options for this app.