-
Notifications
You must be signed in to change notification settings - Fork 58
Generating dependency_licenses.json
Courtney Brousseau edited this page Aug 5, 2019
·
3 revisions
Code.gov repos should have a dependency_licenses.json referenced in the LICENSE.md to indicate the licenses of all of the project dependencies. This file should be updated periodically as well as whenever a new dependency is added
To generate a dependency_licenses.json, we use the NPM license-checker
package.
Some projects, including code-gov-front-end
, have the following script configured in the package.json which will generate a new dependency_licenses.json file
npm run licenses
If a project does not already have this script configured you should add it
First install the NPM package:
npm install license-checker
Once it is installed, add this script to the scripts in the package.json:
"licenses": "license-checker --json --relativeLicensePath --out dependency_licenses.json"