How to use gulp-util - 10 common examples

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 noahmiller / gulp-scsslint / test / main.js View on Github external
var getFile = function(filePath) {
   filePath = 'test/' + filePath;
   return new gutil.File({
      path: filePath,
      cwd: 'test/',
      base: path.dirname(filePath),
      contents: null
   });
};
github wookiehangover / gulp-mocha-selenium / index.js View on Github external
browser.quit(function() {
          if (selenium.kill) {
            selenium.kill();
          }
          stream.emit('error', new gutil.PluginError('gulp-mocha', err));
          cb();
        });
      }
github jelz / gulp-metalsmith / lib / index.js View on Github external
function emitError(messageOrErr) {
    var opts = {showStack: true};
    var err = new gutil.PluginError(PLUGIN_NAME, messageOrErr, opts);
    s.emit('error', err);
  }
}
github kamranahmedse / gulp-css-tailor / index.js View on Github external
function endStream() {
    var generatedCss = tailor.generateLazy(options);
    var cssContent = options.minifyOutput ? generatedCss.minified : generatedCss.formatted;

    var outputFile = new gutil.File({
      cwd: firstFile.cwd,
      base: firstFile.base,
      path: path.join(firstFile.base, options.filename),
      contents: new Buffer(cssContent)
    });

    this.push(outputFile);
    this.emit('data', outputFile);
    this.emit('end');
  }
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('------------------------------'));
});

gulp-util

Utility functions for gulp plugins

MIT
Latest version published 7 years ago

Package Health Score

50 / 100
Full package analysis

Similar packages