How to use the gulp-notify 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 alienfast / gulp-pipeline / dist / gulp-pipeline.es.js View on Github external
notifyError(error, watching = false) {
    let lineNumber = (error.lineNumber) ? `Line ${error.lineNumber} -- ` : ''
    let taskName = error.task || this.taskName()

    notify({
      title: `Task [${taskName}] Failed in [${error.plugin}]`,
      message: `${lineNumber}See console.`,
      sound: 'Sosumi' // See: https://github.com/mikaelbr/node-notifier#all-notification-options-with-their-defaults
    }).write(error)

    let tag = Util.colors.black.bgRed
    let report = `

${tag('    Task:')} [${Util.colors.cyan(taskName)}]
${tag('  Plugin:')} [${error.plugin}]
${tag('   Error:')}
${error.message}`

    if (error.lineNumber) {
      report += `${tag('    Line:')} ${error.lineNumber}\n`
    }
github dsebastien / midnightLightV2 / gulp / utils.js View on Github external
let reportError = function(error) {

	let lineNumber = error.lineNumber ? 'LINE ' + error.lineNumber + ' -- ' : '';

	notify({
		title: 'Task Failed [' + error.plugin + ']',
		message: lineNumber + 'See console.',
		sound: true

		// the version below probably works on OSX
		//sound: 'Sosumi' // See: https://github.com/mikaelbr/node-notifier#all-notification-options-with-their-defaults
	}).write(error);

	//gutil.beep(); // Beep 'sosumi' again

	// Inspect the error object
	//gutil.log(error);

	// Easy error reporting
	//console.log(error.toString());
github micromata / Baumeister / gulp / on-error.js View on Github external
function onError(err) {
	notify({
		title: 'Gulp Task Error',
		subtitle: 'Plugin: <%= error.plugin %>',
		message: 'Check the console.'
	}).write(err);

	console.error(err.toString());

	this.emit('end');
}
github seansfkelley / react-layered-chart / gulpfile.babel.js View on Github external
function rebundle() {
    const bundle = bundler.bundle();

    if (!dieOnError) {
      bundle.on('error', notify.onError({
        title : 'Browserify Error',
        sound : 'Sosumi',
        wait  : false
      }));
    }

    return bundle
      .pipe(sourceStream(dest))
      .pipe(buffer())
      .pipe(sourcemaps.init({ loadMaps : true}))
      .pipe(notify({
        title   : 'Finished compiling Javascript',
        message : '<%= file.relative %>',
        sound   : 'Glass',
        wait    : false
      }))
      .pipe(sourcemaps.write('./'))
      .pipe(gulp.dest('./build'))
      .pipe(filter([ '*', '!*.map' ]))
      .pipe(livereload());
  }
github laravel / elixir / src / Notification.js View on Github external
message(message) {
        notify.logLevel(0);

        return notify({
            title: this.title,
            message: message,
            icon: __dirname + '/../icons/laravel.png',
            onLast: true
        });
    }
github thecreation / jquery-asScrollable / gulp / tasks / scripts.js View on Github external
.on('error', handleErrors)
      .pipe(plumber({errorHandler: handleErrors}))
      .pipe(rollup({
        input: `${src}/${input}`,
        format: 'es',
        globals: {
          jquery: 'jQuery'
        }
      }))
      .pipe(header(config.banner))
      .pipe(rename({
        basename: config.name,
        suffix: '.es'
      }))
      .pipe(gulp.dest(dest))
      .pipe(notify({
        title: config.notify.title,
        message: message,
        onLast: true
      }));
  };
}
github thecreation / jquery-slidePanel / gulp / tasks / scripts.js View on Github external
.pipe(plumber({errorHandler: handleErrors}))
      .pipe(rollup({
        input: `${src}/${input}`,
        format: 'es',
        globals: dependencies,
        external: [
          'jquery'
        ]
      }))
      .pipe(header(config.banner))
      .pipe(rename({
        basename: config.name,
        suffix: '.es'
      }))
      .pipe(gulp.dest(dest))
      .pipe(notify({
        title: config.notify.title,
        message: message,
        onLast: true
      }));
  };
}
github laravel / elixir / src / Notification.js View on Github external
static forPassedTests(framework) {
        return notify({
            title: 'Green!',
            message: `Your ${framework} tests passed!`,
            icon: `${__dirname}/../icons/pass.png`,
            onLast: true
        });
    }
github thecreation / jquery-asPieProgress / gulp / tasks / styles.js View on Github external
.pipe(cssnano({
        safe: true,
        autoprefixer: false
      }))
      .pipe(header(config.banner))
      .pipe(gulpif(
        createSourcemap,
        sourcemaps.write(config.deploy ? './' : null))
      )
      .pipe(gulp.dest(dest))
      .pipe(size({
        title: 'minified styles',
        showFiles: true
      }))
      .pipe(browser.stream())
      .pipe(notify({
        title: config.notify.title,
        message: message,
        onLast: true
      }));
  };
}
github thecreation / gulp-starter-kit / tasks / copy.js View on Github external
gulp.task('copy', () => {
  return gulp
    .src(`${config.assets.source}/**/*`)
    .pipe(gulp.dest(`${config.assets.build}`))
    .pipe(browser.stream())
    .pipe(
      gulpif(
        config.enable.notify,
        notify({
          title: config.notify.title,
          message: 'Copy task complete',
          onLast: true,
        })
      )
    );
});

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 2 months ago

Package Health Score

75 / 100
Full package analysis