log.js 325 B

12345678910111213141516
  1. 'use strict';
  2. var hasLog = require('has-gulplog');
  3. var each = require('lodash/fp/forEach');
  4. var levels = ['debug', 'info', 'warn', 'error'];
  5. each(function(level) {
  6. module.exports[level] = function() {
  7. if (hasLog()) {
  8. var log = require('gulplog');
  9. log[level].apply(log, arguments);
  10. }
  11. };
  12. }, levels);