mwittig / npm-license-crawler

Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
BSD 3-Clause "New" or "Revised" License
233 stars 45 forks source link
license license-management license-scan licensing

NPM License Crawler

npm version Greenkeeper badge

NPM License Crawler is a wrapper around license-checker to analyze several node packages (package.json files) as part of your software project. This way, it is possible to create a list of third party licenses for your software project in one go. File paths containing ".git" or "node_modules" are ignored at the stage where 'package.json' files are matched to provide the entry points to calling license-checker.

Contributions

If you like npm-license-crawler, please consider ★ starring the project on github. Contributions to the project are welcome. You can simply fork the project and create a pull request with your contribution to start with.

Installation

Use global installation to be able to run npm-license-crawler from the command line.

npm i npm-license-crawler -g

Options

Example

Called from the npm-license-crawler installation directory. If called in another directory make sure the given exclude path exists (or omit the --exclude option and argument).

npm-license-crawler  --exclude ./lib --dependencies --csv licenses.csv

Using npm-license-crawler API

See the following example.

var crawler = require('npm-license-crawler'),
    options = {
        start: ['../..'],
        exclude: ['.'],
        json: 'licenses.json',
        unknown: true
    };

crawler.dumpLicenses(options,
    function(error, res){
        if (error) {
            console.error("Error:", error);
        }
        else {
            console.dir(res);
        }
    }
);

History

See Release History.

Build Status

Build Status