Skip to content
Commit 4c541842 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

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
parent b0472cce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment