How to use the gulp-notify.onError function in gulp-notify

To help you get started, we’ve selected a few gulp-notify 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 laravel / elixir / src / Notification.js View on Github external
error(e, message) {
        notify.onError({
            title: this.title,
            message: message + ': <%= error.message %>',
            icon: __dirname + '/../icons/fail.png',
            onLast: true
        })(e);

        // We'll spit out the error, just in
        // case it is useful for the user.
        console.log(e);
    }
github ghiscoding / aurelia-slickgrid / client-cli / aurelia_project / tasks / process-markup.js View on Github external
export default function processMarkup() {
  return gulp.src(project.markupProcessor.source)
    .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
    .pipe(changedInPlace({firstPass:true}))
    .pipe(htmlmin({
        removeComments: true,
        collapseWhitespace: true,
        minifyCSS: true,
        minifyJS: true,
        ignoreCustomFragments: [/\${.*?}/g] // ignore interpolation expressions
    }))
    .pipe(build.bundle());
}
github gist-run / gist-run / build / tasks / build.js View on Github external
gulp.task('build-amd', function() {
  return gulp.src(paths.source)
    .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
    .pipe(changed(paths.output, {extension: '.js'}))
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(to5(assign({}, compilerOptions, {modules: 'amd'})))
    .pipe(sourcemaps.write({includeContent: true}))
    .pipe(gulp.dest(paths.output));
});
github kerrishotts / Mastering-PhoneGap-Code-Package / logology / gulp / tasks / copy-scss.js View on Github external
}));
    }
    var moreIncludePaths = config.sass && config.sass.includePaths;
    if (moreIncludePaths instanceof Array) {
        includePaths = includePaths.concat(moreIncludePaths);
    }
    return gulp.src(paths.makeFullPath(config.assets.styles.src, paths.SRC))
               .pipe(isRelease ? gutil.noop() : sourcemaps.init())
               .pipe(sass({
                   includePaths: includePaths,
                   outputStyle: (isRelease ? "compressed" : "nested")
               }))
               .on("error", function (error) {
                   this.emit("end");
               })
               .on("error", notify.onError(function (error) {
                   return "SASS: " + error.message;
               }))
               .pipe(autoprefixer({browsers: ["last 2 versions"]}))
               .pipe(isRelease ? gutil.noop() : sourcemaps.write())
               .pipe(gulp.dest(paths.makeFullPath(config.assets.styles.dest, paths.DEST)))
               .pipe(browserSync.stream());
}
github bannertime / generator-bannertime / generators / app / templates / gulpfile.js / lib / handleErrors.js View on Github external
module.exports = function(error) {
  notify.onError(error.toString()).apply(this, arguments);
  gutil.log(error.stack);
  this.emit('end');
};
github ajrouvoet / positron-bar / gulpfile.babel.js View on Github external
function rebundle() {
    let stream = bundler.bundle();
    return stream
      .on("error", notify.onError({
        message: "Error: <%= error.message %>",
        title: "Error building scripts"
      }))
      .on('end', function() { gutil.log("Done building scripts"); })
      .pipe(source(entryFile))
      .pipe(rename('index.js'))
      .pipe(gulp.dest(path.join(dist, 'scripts')));
  };
github garage11 / ca11 / gulp / tasks / assets.js View on Github external
tasks.templates = function assetsTemplates() {
        let sources = [path.join(settings.BASE_DIR, './components/**/*.vue')]

        return gulp.src(sources)
            .pipe(vueCompiler({
                commonjs: false,
                namespace: 'global.templates',
                pathfilter: ['src', 'components', 'node_modules'],
            }))
            .on('error', notify.onError('Error: <%= error.message %>'))
            .pipe(ifElse(settings.BUILD_OPTIMIZED, () => minifier()))
            .pipe(concat('templates.js'))
            .pipe(insert.prepend('global.templates={};'))
            .pipe(gulp.dest(path.join(settings.BUILD_DIR, 'js')))
            .pipe(size(_extend({title: 'templates'}, settings.SIZE_OPTIONS)))
    }
github AdFabConnect / adfab-gulp-boilerplate / tasks / less.js View on Github external
const gulp = require('gulp');
    const plumber = require('gulp-plumber');
    const notify = require('gulp-notify');
    const gulpif = require('gulp-if');
    const browserSync = require('browser-sync');
    const lessPipe = require('../pipe/less');
    const util = require('gulp-util');
    
    const config = util.env.boilerplate.config;
    const lessConfig = config.tasks[configName];

    const isWatching = ['serve', 'watch'].indexOf(process.argv[2]) >= 0;

    return gulp.src(lessConfig.source, {cwd: config.sourceRoot})
        .pipe(plumber({
            errorHandler: notify.onError({
                message: '<%= error.message %>',
                title: 'Less Error'
            })
        }))
        .pipe(lessPipe())
        .pipe(gulp.dest(config.destinationRoot + lessConfig.destination))
        .pipe(gulpif(isWatching, browserSync.stream({once: true})))
        .pipe(notify('Successfully compiled Less ' + configName));
};
github eramdam / BetterTweetDeck / gulpfile.babel.js View on Github external
const maybeNotifyErrors = () => notify.onError({
  title: 'Compile Error',
  message: '<%= error.message %>',
});
github EC-CUBE / ec-cube / gulp / task / scss-min.js View on Github external
module.exports = () => {
  return src([config.paths.source.template + config.paths.assets.scss], {
      sourcemaps: true,
      base: config.paths.source.template
    })
    .pipe(plumber({
      errorHandler: notify.onError('Error: <%= error.message %>')
    }))
    .pipe(sass())
    .pipe(postcss([
      autoprefixer(),
      cssmqpacker({
        sort: sortCSSmq
      }),
    ]))
    .pipe(cleanCSS())
    .pipe(rename((path) => {
      path.dirname = path.dirname.replace(/scss$/, 'css')
      if (path.extname === '.css') path.extname = '.min.css'
    }))
    .pipe(dest(config.paths.output.template, {sourcemaps: '.'}))
}

gulp-notify

gulp plugin to send messages based on Vinyl Files or Errors to Mac OS X, Linux or Windows using the node-notifier module. Fallbacks to Growl or simply logging

MIT
Latest version published 3 months ago

Package Health Score

72 / 100
Full package analysis