How to use the gulp-util.log function in gulp-util

To help you get started, we’ve selected a few gulp-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ostrost / ostent / gulpfile.js View on Github external
webpack(wparg).run(function(err, stats) {
    if (err !== null) {
      throw new gutil.PluginError('webpack', err);
    }
    var statsString = stats.toString({chunks: false});
    if (stats.hasErrors() === true) {
      throw new gutil.PluginError('webpack', statsString);
    }
    gutil.log('[webpack]', statsString);
    callback();
  });
});
github microsoft / vscode / build / monaco / api.js View on Github external
function logErr(message) {
    var rest = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        rest[_i - 1] = arguments[_i];
    }
    util.log(util.colors.red('[monaco.d.ts]'), 'WHILE HANDLING RULE: ', CURRENT_PROCESSING_RULE);
    util.log.apply(util, [util.colors.red('[monaco.d.ts]'), message].concat(rest));
}
function moduleIdToPath(out, moduleId) {
github RackHD / on-web-ui / scripts / tasks / bundle.js View on Github external
function handler(err, stats) {
    if (err) {
      return callback(new gulpUtil.PluginError('webpack', err));
    }

    if (global.parameters.argv.verbose) {
      gulpUtil.log('[webpack]', stats.toString({colors: true}));
    }

    if (!started) {
      started = true;
      return callback();
    }
  }
github liferay / sennajs.com / tasks / lib / util.js View on Github external
function logError(err) {
  if (err.fileName) {
    gutil.log(gutil.colors.red('Error'), err.fileName, lookupErrorLine(err));
  } else if (err.message) {
    gutil.log(gutil.colors.red('Error'), err.message);
  } else {
    gutil.log(gutil.colors.red('Error'), err);
  }
}
github bannertime / generator-bannertime / generators / app / templates / gulpfile.js / lib / backup-generator.js View on Github external
server.close(function() {
      gutil.log('backup-generator:', 'backups saved: ', gutil.colors.cyan(numSaved), 'backups skipped: ', gutil.colors.magenta(numSkipped), 'backups failed: ', gutil.colors.red(numFailed));
      cb();
    });
  });
github tundrax / angular-gulp / gulpfile.js View on Github external
gulp.task('start', function () {
  setEnv();
  setVersion();
  setPaths();

  gutil.log(gutil.colors.green('------------------------------'));
  gutil.log(gutil.colors.green('-'), '    Env:', gutil.colors.yellow(config.env));
  gutil.log(gutil.colors.green('-'), '  Debug:', gutil.colors.yellow(config.debug));
  gutil.log(gutil.colors.green('-'), 'Version:', gutil.colors.yellow(config.version));
  gutil.log(gutil.colors.green('------------------------------'));
});
github wavesoft / dot-dom / gulpfile.js View on Github external
files.forEach((file, index) => {
      const size = index
        ? gutil.colors.red(file.contents.byteLength)
        : gutil.colors.green(file.contents.byteLength);

      gutil.log(gutil.colors.magenta(path.basename(file.path)), size);
    });
github Shopify / slate / tasks / includes / messages.js View on Github external
logFileEvent: function(event, path) {
    path = separatePath(path);
    gutil.log('change in',
      gutil.colors.magenta(path.dir),
      gutil.colors.white('-'),
      gutil.colors.cyan(event),
      gutil.colors.yellow(path.file)
    );
  },
github Shopify / slate / packages / slate-tools / src / tasks / includes / messages.js View on Github external
logFileEvent: (event, path) => {
    const pathObject = separatePath(path);

    gutil.log('change in',
      gutil.colors.magenta(pathObject.dir),
      gutil.colors.white('-'),
      gutil.colors.cyan(event),
      gutil.colors.yellow(pathObject.file),
    );
  },
github ecomfe / gulp-fontmin / index.js View on Github external
function printMsg(originalFile, optimizedFile, verbose) {
        var originalSize = originalFile.contents.length;
        var optimizedSize = optimizedFile.contents.length;
        var saved = originalSize - optimizedSize;
        var percent = originalSize > 0 ? (saved / originalSize) * 100 : 0;
        var savedMsg = 'saved ' + prettyBytes(saved) + ' - ' + percent.toFixed(1).replace(/\.0$/, '') + '%';
        var msg = saved > 0 ? savedMsg : 'already optimized';

        var optimizedType = (path.extname(optimizedFile.path) || path.extname(originalFile.path)).toLowerCase();

        if (verbose) {
            msg = chalk.green('✔ ') + originalFile.relative + ' -> ' + optimizedType + chalk.gray(' (' + msg + ')');
            gutil.log('gulp-fontmin:', msg);
        }

    }

gulp-util

Utility functions for gulp plugins

MIT
Latest version published 8 years ago

Package Health Score

50 / 100
Full package analysis

Similar packages