license-checks
v1.0.1
Published
## Install
Downloads
3
Readme
license-checks
Install
npm install license-checks
Usage
license-checks
Options
--deep
check all modules innode_modules
(defaults todependencies
anddevDependencies
)--only-prod
check onlydependencies
inpackage.json
(defaults todependencies
anddevDependencies
)--count
only log license count (defaults to throwing an error when licenses are not whitelisted)--config FILE
set the path to the config file (defaults toallowed-licenses.json
)
Config file
You must have a config file. Either allowed-licenses.json
or another JSON file (if defined with --config
)
The JSON may have two keys:
whitelist
(string[]
) a list of whitelisted licensesexceptions
({ package: string, license: string[] }
) exceptions by package and license
Example file
{
"whitelist": [
"GPLv2",
"MIT",
],
"exceptions": [
{
"package": "some-commercial-package-i-have-a-license-for",
"license": "commercial"
}
]
}