Allow to define runtime options in configuration file.

This commit is contained in:
Rafał Wrzeszcz 2011-12-10 23:02:47 +01:00
parent d7e74062b1
commit 03d9a9f16d

View File

@ -159,6 +159,16 @@ function main() {
env.opts.query = require('query').toObject(env.opts.query);
}
// allow to pass arguments from configuration file
if (env.conf.opts) {
for (var opt in env.conf.opts) {
// arguments passed in command are more important
if (!(opt in env.opts)) {
env.opts[opt] = env.conf.opts[opt];
}
}
}
// which version of javascript will be supported? (rhino only)
if (typeof version === 'function') {
version(env.conf.jsVersion || 180);
@ -244,4 +254,4 @@ function main() {
else { // TODO throw no publish warning?
}
}
}
}