Skip to content

Commit

Permalink
add recurseDepth config option (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
hegemonic committed Jul 7, 2017
1 parent 8f5c60b commit 43a117d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cli.js
Expand Up @@ -315,8 +315,8 @@ cli.scanFiles = function() {
if (env.conf.source && env.opts._.length) {
filter = new Filter(env.conf.source);

env.sourceFiles = app.jsdoc.scanner.scan(env.opts._, (env.opts.recurse ? 10 : undefined),
filter);
env.sourceFiles = app.jsdoc.scanner.scan(env.opts._,
(env.opts.recurse ? env.conf.recurseDepth : undefined), filter);
}

return cli;
Expand Down
13 changes: 7 additions & 6 deletions lib/jsdoc/config.js
Expand Up @@ -24,19 +24,20 @@ function mergeRecurse(target, source) {

// required config values, override these defaults in your config.json if necessary
var defaults = {
plugins: [],
recurseDepth: 10,
source: {
includePattern: '.+\\.js(doc|x)?$',
excludePattern: ''
},
tags: {
allowUnknownTags: true,
dictionaries: ['jsdoc', 'closure']
},
templates: {
monospaceLinks: false,
cleverLinks: false
},
source: {
includePattern: '.+\\.js(doc|x)?$',
excludePattern: ''
},
plugins: []
}
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/jsdoc/tutorial/resolver.js
Expand Up @@ -100,7 +100,7 @@ exports.addTutorial = function(current) {
exports.load = function(filepath) {
var content;
var current;
var files = fs.ls(filepath, env.opts.recurse ? 10 : undefined);
var files = fs.ls(filepath, env.opts.recurse ? env.conf.recurseDepth : undefined);
var name;
var match;
var type;
Expand Down

0 comments on commit 43a117d

Please sign in to comment.