@guidesmiths/license-checker

License checker for GuideSmiths projects

Usage no npm install needed!

<script type="module">
  import guidesmithsLicenseChecker from 'https://cdn.skypack.dev/@guidesmiths/license-checker';
</script>

README

@guidesmiths/license-checker

All Contributors

License checker for GuideSmiths projects

Roadmap:

https://github.com/guidesmiths/license-checker/issues/29

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

  • Install the package
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
--start Path of the initial json to look for string process.cwd()
--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 license-report-<timestamp>.md
--errorReportFileName Name of the file generated when a license in the failOn option is found string license-error-<timestamp>.md
--disableErrorReport Flag to disable the error report file generation boolean false
--disableReport Flag to disable the report file generation, whether there is an error or not boolean false
--customHeader Name of a text file containing the custom header to add at the start of the generated report string
-h, --help Shows help boolean

Useful links

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Jose Manuel Torralvo Moyano

๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Mario Quiroga

๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

รรฑigo Marquรญnez

๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐Ÿšง ๐Ÿ‘€

Sara Hernรกndez

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!