Create an appendix from the license-checker output.
NOTE: This tool provides options to fix the broken licenses. Please use at your own interest.
-
In addition to creating an appendix from license-checker, this tool attempts to fix the broken licenses using below approaches in order,
- Extract license from README file using regex.
- Search the module's Github repo for license. (License is ignored if the license is changed in latest repo)
- Generate licenses using template if none of the above worked.
-
Fixing licenses is optional. Type 'no' if you want the default output from license-checker to be generated.
-
Log file is generated by default with the details of broken licenses, fixed licenses.
You can use shorthands like -p instead --path, type
node index.js --help
for more details
-
Basic text example
node index.js --path <src_dir> --output licenses.text
-
Create json output
node index.js --json --path <src_dir> --output licenses.json
-
Auto fix broken licenses
node index.js --fix --json --path <src_dir> --output licenses.json
-
Skip fixing broken licenses, generate default output from license-checker
node index.js --skip --json --path <src_dir> --output licenses.json
If
--fix
or--skip
option is not provided, a prompt will be presented to the user to choose either to fix or to skip the broken licenses. -
Do not generate log file (not recommended)
node index.js --fix --json --quiet --path <src_dir> --output licenses.json
-
Use Oauth token to fetch license from GitHub
node index.js --fix --json --path <src_dir> --output licenses.json --auth <your_github_personal_acces_token>
Visit this link to create your personal access token.
Please create an issue with the relevant details. Submitting a PR would be even great !!