Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 1.99 KB

README.md

File metadata and controls

79 lines (63 loc) · 1.99 KB

NPM License Checker

Ever needed to see all the license info for a module and it's dependencies?

It's this easy:

npm install -g license-checker

mkdir foo
cd foo
npm install yui-lint
license-checker

You should see something like this:

scanning ./yui-lint
├─ [email protected]
│  ├─ repository: http://github.com/chriso/cli
│  └─ licenses: MIT
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/node-glob
│  └─ licenses: UNKNOWN
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/node-graceful-fs
│  └─ licenses: UNKNOWN
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/inherits
│  └─ licenses: UNKNOWN
├─ [email protected]
│  └─ licenses: MIT
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/node-lru-cache
│  └─ licenses: MIT
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/node-lru-cache
│  └─ licenses: MIT
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/minimatch
│  └─ licenses: MIT
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/minimatch
│  └─ licenses: MIT
├─ [email protected]
│  ├─ repository: https://github.com/isaacs/sigmund
│  └─ licenses: UNKNOWN
└─ [email protected]
   ├─ licenses: BSD
      └─ repository: http://github.com/yui/yui-lint

You can also specify --unknown to only show licenses that it can't determine or guessed at (from README)

Also supports --json /path/to/save.json to export the data.

Added support for --csv /path/to/save.csv to export the data as comma-separated values.

Requiring

var checker = require('license-checker');

checker.init({
    start: '/path/to/start/looking'
}, function(json) {
    //The sorted json data
});

build status

Build Status