Implement --config for loading options from JSON file.
Implementation is quite simple - we parse the JSON into array of
options and pass it to existing optparser instance. Additionally
we evaluate all paths in config file relative to the location of
config file.
jsduck --config path/to/config.json
Config file syntax is quite simple:
{
"--guides": "guides.json",
"--warnings": ["+all", "-link"],
"--": ["file1.js", "file2.js", "file3.js"
}
Passing this as config will be the same as invoking jsduck with:
jsduck --guides guides.json
--warnings +all --warnings -link
file1.js file2.js file3.js
Loading
Please sign in to comment