Skip to content

Instantly share code, notes, and snippets.

@bernieperez
Created April 4, 2014 21:17
Show Gist options
  • Save bernieperez/9983330 to your computer and use it in GitHub Desktop.
Save bernieperez/9983330 to your computer and use it in GitHub Desktop.
Quick way to dump your transitive licenses from your node app.
'use strict';
var checker = require('license-checker');
// Example of how to use:
// cd to the node app directory
// node license.js ./ > ~/Desktop/app-name.csv
console.log("Name@version, repo, licenses");
checker.init({
start: process.argv[2]
}, function(json) {
for (var key in json) {
if (json.hasOwnProperty(key)) {
console.log(key + "," + json[key].repository + "," + json[key].licenses);
}
}
});
@bernieperez
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment