disclaimer v1.0.1
A tool for generating third party license/notice text.
Installation
To use it globally, run the following command:
npm i -g disclaimer
For local installation as dev-dependency, run the following command:
npm i --save-dev disclaimer
Usage
disclaimer
Will generate ThirdPartyLicenses.txt - with discovered license and notice texts.
Use --outputFile to specify custom output file name:
disclaimer --outputFile=Notices.txt
Use --reportNotFound, so that, the command will report about those packages - with no license texts discovered:
Use --prependFile to specify a file, content of which will be prepended to the generated file.
Use --appendFile to specify a file, content of which will be appended to the generated file.
Use --cacheDir to specify a directory, where will be saved cached data for future use - for potentially faster subsequent generation of outputs.
disclaimer --reportNotFound
Programmatic approach
import { disclaimer } from 'disclaimer'
async function main() {
const items = await disclaimer()
}
items will be an array containing objects like:
{
"name": "disclaimer",
"version": "1.0.0",
"packagePath": "/path/to/node_modules/disclaimer",
"repository": "https://github.com/tsomaia-me/disclaimer.git",
"repositoryUrl": "https://github.com/tsomaia-me/disclaimer",
"author": {
"name": "Tornike Tsomaia",
"email": "tsomaia.me@gmail.com"
},
"homepage": "",
"licenseText": "MIT License\n\nCopyright (c) 2020 tsomaia-me\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
"noticeText": "",
"licenses": [
"MIT"
]
}
author will have the same structure as in package.json
Disclaimer
The generated text may not be 100% accurate and/or 100% comprehensive.