license-sorter
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Licence-Sorter Build Status

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.

Package Sidebar

Install

npm i license-sorter

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

24.9 kB

Total Files

16

Last publish

Collaborators

  • tobysmith568