@guidesmiths/license-checker
License checker for GuideSmiths projects
Description
This package allows you to do a quick audit on your NPM dependencies by adding it in your hooks.
You can optionally add options to exclude generating the report or avoid generating the error report in case a forbidden license is found (see more details here)
How to use it in your project
npm install @guidesmiths/license-checker
- Add a script to run the package
npx @guidesmiths/license-checker --failOn license1,license2
- Use the script wherever you want (husky hook, in your CI/CD pipeline, ...)
Options
Option | Description | Type | Default |
---|
--version | Shows the version of the package | boolean | |
--failOn | fail (exit with code 1) on the first occurrence of the licenses of the comma-separated list | string | |
--generateOutputOn | generates an output file only if any the licenses of the comma-separated list exist (output generated by default) | string | |
--outputFileName | name of the output file generated | string | licence-report-<timestamp> .txt |
--errorReportFileName | name of the file generated when a licence in the failOn option is found | string | license-error-<timestamp> .txt |
--disableErrorReport | flag to disable the error report file generation | boolean | false |
-h, --help | Shows help | boolean | |
Useful links
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!