log.js 318 B

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