mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Added support for the -r (recurse) option to the options processor.
This commit is contained in:
parent
3f0b393b0e
commit
71144fa6ce
2
main.js
2
main.js
@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
if (opts._.length > 0) {
|
||||
sourceFiles = jsdoc.src.getFilePaths(opts._);
|
||||
sourceFiles = jsdoc.src.getFilePaths(opts._, (opts.recurse? 10 : undefined));
|
||||
|
||||
jsdoc.parser.parseFiles(sourceFiles, opts.encoding);
|
||||
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
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('h', 'help', false, 'Print help message and quit.');
|
||||
argsParser.addOption('V', 'validate', false, 'Validate the results produced by parsing the source code.');
|
||||
|
||||
argsParser.addOption('r', 'recurse', false, 'Recurse into subdirectories to find source files.');
|
||||
|
||||
/**
|
||||
Set the options for this app.
|
||||
@method set
|
||||
|
||||
@ -57,6 +57,14 @@
|
||||
});
|
||||
});
|
||||
|
||||
//// setting the recurse option
|
||||
describe('The return value of jsdoc.opts#recurse when called with `-r`', function() {
|
||||
it('should have a property `recurse` set to true', function() {
|
||||
var returnedValue = jsdoc.opts.set(['-r', true]);
|
||||
expect(returnedValue.recurse).to(be, true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('The return value of jsdoc.opts#set when called with `["--destination", "flib/flub.json"]`', function() {
|
||||
it('should have a property `destination` set to "flib/flub.json"', function() {
|
||||
var returnedValue = jsdoc.opts.set(['--destination', 'flib/flub.json']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user