mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Added --configure option.
This commit is contained in:
parent
05ab6caf14
commit
d57a993a1a
10
main.js
10
main.js
@ -53,7 +53,7 @@ env = {
|
||||
start: new Date(),
|
||||
finish: null
|
||||
},
|
||||
args: arguments.slice(1), // jsdoc.jar sets argument[0] to the abspath to main.js, user args follow
|
||||
args: Array.prototype.slice.call(arguments, 1), // jsdoc.jar adds argument[0], the abspath to main.js, user args follow
|
||||
conf: {},
|
||||
opts: {}
|
||||
};
|
||||
@ -113,15 +113,17 @@ function main() {
|
||||
}
|
||||
};
|
||||
|
||||
env.opts = jsdoc.opts.parser.parse(env.args);
|
||||
|
||||
try {
|
||||
env.conf = JSON.parse( require('common/fs').read(BASEDIR+'conf.json') );
|
||||
env.conf = JSON.parse(
|
||||
require('common/fs').read( env.opts.configure || BASEDIR+'conf.json' )
|
||||
);
|
||||
}
|
||||
catch (e) {
|
||||
throw('Configuration file cannot be evaluated. '+e);
|
||||
}
|
||||
|
||||
env.opts = jsdoc.opts.parser.parse(env.args);
|
||||
|
||||
if (env.opts.query) {
|
||||
env.opts.query = require('common/query').toObject(env.opts.query);
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
};
|
||||
|
||||
argsParser.addOption('t', 'template', true, 'The name of the template to use. Default: the "default" template');
|
||||
argsParser.addOption('c', 'configure', true, 'The path to the configuration file. Default: jsdoc basedir + conf.json');
|
||||
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 all tests and quit.');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user