Created
March 16, 2018 02:42
-
-
Save prochafilho/1ee3e6eaaa78836c8a7bc05eb9359195 to your computer and use it in GitHub Desktop.
Checks for modules using GPL License
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const checker = require('license-checker') | |
function usingGPL(err, packages){ | |
if (err) { | |
throw err | |
} else { | |
let gpls = Object | |
.keys(packages) | |
.filter(package => | |
packages[package] | |
.licenses | |
.includes('GPL')) | |
console.log(gpls) | |
} | |
} | |
checker | |
.init({start: path.resolve(__dirname)}, usingGPL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment