licensetool is a license tool for web frontend.
- Add licensetool to your NPM dependency:
$ npm install --save-dev github:pfnet/licensetool
- Output a concatenated license notices of the dependency NPM packages:
$ npx licensetool format --config licensetool.json
$ npx licensetool format --config licensetool.json --output csv # or output as csv
When using the --output csv option, the generated CSV file will have the following format:
licenseName,packageName
MIT License,[email protected]
MIT License,[email protected]
packages
Override the properties of the specified packages.
If some properties or a whole package entry is missing from packages
, those retrieved by license-checker-rseidelsohn and other libraries are used.
packages.omit
Omit this package from the license notices.
{
"packages": {
"[email protected]": {
"omit": true
}
}
}
packages.licenseId
Specify the SPDX ID.
{
"packages": {
"[email protected]": {
"licenseId": "MIT"
}
}
}
packages.licenseName
Specify the license name.
{
"packages": {
"[email protected]": {
"licenseName": "Modified MIT"
}
}
}
packages.licenseFile
Specify the file whose contents is the license text.
If null
is given, it invalidates the corresponding property retrieved by license-checker-rseidelsohn, which leads to using the default license notice of the resolved SPDX.
{
"packages": {
"[email protected]": {
"licenseFile": "path/to/license-notice.txt"
}
}
}
{
"packages": {
"[email protected]": {
"licenseFile": null
}
}
}
packages.licenseContent
Directly specify the content of license notice.
{
"packages": {
"[email protected]": {
"licenseContent": "Some Package License\n\nCopyright (C) 2023 John Doe\n\nSome license notice sentences"
}
}
}