a license collector for npm and bower dependencies
$ npm install license-collector -g
You can use the license collector in the cli or in code.
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*"
var licenseCollector = require('license-collector').licenseCollector
licenseCollector(__dirname, {
ignoreNpm: true,
output: 'licenses.json',
verbose: true,
licensePatterns: ['*license*', '*readme*']
}).then(function (result) {
done()
}, console.log)
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)
})
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
MIT © 2016 niels wijers