-
-
Save ddprrt/6178d3ce2ae66f97c3689622c4834bdd to your computer and use it in GitHub Desktop.
Blacklisted plugins
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 fetch = require('node-fetch'); | |
const modules = require('./package.json'); | |
const blacklist = 'https://raw.githubusercontent.com/gulpjs/plugins/master/src/blackList.json'; | |
gulp.task('check-plugins', () => { | |
return fetch(blacklist) | |
.then(response => response.text()) | |
.then(result => JSON.parse(result)) | |
.then(black => { | |
['dependencies', 'devDependencies'].forEach(el => { | |
Object.keys(modules[el]).forEach(key => { | |
if(!!black[key]) throw new Error('blacklisted software used') | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment