-
Notifications
You must be signed in to change notification settings - Fork 240
Config file
Rene Saarsoo edited this page Jul 3, 2013
·
4 revisions
Instead of listing oh-so-many JSDuck options on command line you can create a JSON config file like this:
{
"--title": "My personal docs",
"--welcome": "welcome.html",
"--warnings": ["-link", "-no_doc"],
"--seo": true,
"--": [
"src/Foo.js",
"src/Bar.js",
"src/Baz.js"
]
}
- All the listed paths will be taken relative to the config file itself.
- The special "--" option is for passing the input files.
- Boolean options (without parameters) must have value
true
. - To pass an option multiple times, list its values in an array.
You pass this file to JSDuck using the --config
option:
$ jsduck --config=myconfig.json
Or you could save it as jsduck.json
and you'll be able to run
JSDuck without any options at all when this file is in the current dir:
$ jsduck
The result is as if you had called JSDuck with the following options:
$ jsduck --title="My personal docs" \
--welcome="welcome.html" \
--warnings=-link \
--warnings=-no_doc \
--seo \
src/Foo.js src/Bar.js src/Baz.js