A set of helpful scripts for your license management.
This set of scripts automatically generates license files for your projects. It extracts license information from your project's dependencies, sorts them by license type, and generates an HTML file containing the sorted list of dependencies and their associated licenses.
- Have the license-checker from davglass installed: https://github.com/davglass/license-checker
- Clone or download this repository to your local machine.
- Copy the scripts folder to your project's root directory.
-
Add the following line to your package.json file's scripts section:
"generate-licenses": "node scripts/generateLicenses.js"
-
Run the script from the terminal:
npm run generate-licenses
Navigate to your project's root directory and run the following command:
node scripts/generateLicenses.js
The script will generate an license.html file in each specified project folder, containing the sorted list of dependencies and their associated licenses.