verify.js 582 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. var log = require('gulplog');
  3. var ansi = require('../ansi');
  4. var exit = require('../exit');
  5. function logVerify(blacklisted) {
  6. var pluginNames = Object.keys(blacklisted);
  7. if (!pluginNames.length) {
  8. log.info(
  9. ansi.green('There are no blacklisted plugins in this project')
  10. );
  11. exit(0);
  12. }
  13. log.warn(ansi.red('Blacklisted plugins found in this project:'));
  14. pluginNames.map(function(pluginName) {
  15. var reason = blacklisted[pluginName];
  16. log.warn(ansi.bgred(pluginName) + ': ' + reason);
  17. });
  18. exit(1);
  19. }
  20. module.exports = logVerify;