license-collector

0.1.1 • Public • Published

NPM version NPM downloads Build Status Coverage Status Dependency Status

a license collector for npm and bower dependencies

How to Install

$ npm install license-collector -g

Getting Started

You can use the license collector in the cli or in code.

CLI

Usage: license-collector <directory ...> [options]

Options:

  -h, --help              output usage information
  -V, --version           output the version number
  -o, --output [value]    Outputfile, use .json or .yml.
  -n, --no_npm            Ignore npm packages
  -b, --no_bower          Ignore bower packages
  -p, --patterns [value]  comma separated list of possibible license files. fg. "*license*,*readme*"

Javascript

var licenseCollector = require('license-collector').licenseCollector
licenseCollector(__dirname, {
    ignoreNpm: true,
    output: 'licenses.json',
    verbose: true,
    licensePatterns: ['*license*', '*readme*']
}).then(function (result) {
    done()
}, console.log)

Gulp

var licenseCollector = require('license-collector').licenseCollector
gulp.task('licenses', function (done) {
    licenseCollector(__dirname, {
        ignoreNpm: true,
        output: 'licenses.json',
        verbose: true,
        licensePatterns: ['*license*', '*readme*']
    }).then(function (result) {
        done()
    }, console.log)
})

How to Test

Run one, or a combination of the following commands to lint and test your code:

$ npm run lint          # Lint the source code with ESLint
$ npm test              # Run unit tests with Mocha
$ npm run test:watch    # Run unit tests with Mocha, and watch files for changes
$ npm run test:cover    # Run unit tests with code coverage by Istanbul

License

MIT © 2016 niels wijers

Readme

Keywords

none

Package Sidebar

Install

npm i license-collector

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • nielswijers