How to use the gulp-notify.withReporter 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 yannickcr / gulp-notify-growl / lib / gulp-notify-growl.js View on Github external
if (typeof appName === 'undefined') {
    appName = 'Gulp';
  }

  applicationOptions = util._extend({
    icon: fs.readFileSync(__dirname + '/gulp.png')
  }, applicationOptions || {});

  var app = new growler.GrowlApplication(appName, applicationOptions);

  app.setNotifications({
    Gulp: {}
  });

  var reporter = notify.withReporter(function(notificationOptions, callback) {

    app.register(function(success, err) {
      if (!success) {
        return callback(err);
      }

      // Rename 'message' property to 'text'
      notificationOptions.text = notificationOptions.message;
      delete notificationOptions.message;

      app.sendNotification('Gulp', notificationOptions, function(success, err) {
        return callback(err, success);
      });

    });

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