license-sorter
v1.1.0
Published
CLI which sorts the JSON output from the library license-checker by the license type
Downloads
4
Maintainers
Readme
Licence-Sorter
This CLI takes a JSON file outputted from the NPM library license-checker and sorts it so that the results are grouped by their licenses.
Eg.
Installation and Usage (CLI)
$ npm install license-sorter -g
$ license-sorter --input licenses.json --output licenses-sorted.json
- Input: The file to be converted
- Output: The file to be created
If either flag is omitted the CLI will prompt you for the inputs.
If you don't supply an input file, and the CLI is able to detect a package.json file, the it will allow you to run the command using dependencies it detects in the local project.
Installation and Usage (Programmatic use)
$ npm install license-sorter
const licenseSorter = require("license-sorter");
licenseSorter.convertFile("licenses.json", "licenses-sorted.json")
.then(() => {
})
.catch(() => {
});
import * as licenseSorter from "license-sorter";
await licenseSorter.convertFile("licenses.json", "licenses-sorted.json");
This library is in no way affiliated with license-checker.