/gulp-notify-growl

A custom notifier for gulp-notify to send messages to Growl clients using GNTP

Primary LanguageJavaScriptMIT LicenseMIT

gulp-notify-growl

NPM version Build Status Dependency Status Coverage Status Code Climate

A custom notifier for gulp-notify to send messages to Growl clients using GNTP.

Installation

$ npm install gulp-notify-growl --save-dev

Usage

In your gulpfile.js:

var
  gulp    = require('gulp'),
  notify  = require('gulp-notify'),
  growl   = require('gulp-notify-growl')
;

// Initialize the notifier
var growlNotifier = notify.withReporter(growl({
  hostname : '192.168.0.10' // IP or Hostname to notify, default to localhost
}));

gulp.task('default', function() {
  gulp.src('./package.json')
  .pipe(growlNotifier({
    title: 'Done.',
    message: 'Done something with the package.json'
  }));
});

Options

hostname

Type: String

IP or Hostname to notify, default to localhost.

port

Type: Number

GNTP port, default to 23053.

timeout

Type: Number

Socket inactivity timeout, default to 5000.

Icon

Type: Buffer

Icon to display in the notification, default to the gulp icon.

Example

var growlNotifier = growl({
  hostname : '192.168.0.10',
  icon : fs.readFileSync('doge.png')
});

additionalHeaders

Type: Object

Additional GNTP headers sent on all requests.

Example

var growlNotifier = growl({
  hostname : '192.168.0.10',
  additionalHeaders: {
    'X-Foo': 'bar'
  }
});

password

Type: String

Password is set in the Growl client settings.

hashAlgorithm

Type: String

Hash algorithm when sending the messages, possible values: MD5, SHA1, SHA256 and SHA512. Default to SHA256.

encryption

Type: String

Encryption used when sending the messages, possible values: AES, DES and 3DES. Default to no encryption.

appName

Type: String

Second argument for custom application name registered in growl. Allows for multiple growlNotifiers with different application names.

Example

var growlPHPUnitNotifier = growl({
  hostname : '192.168.0.10',
  icon : fs.readFileSync('doge.png')
}, 'Very Unit!');

var growlSassNotifier = growl({
  hostname : '192.168.0.10',
  icon : fs.readFileSync('doge.png')
}, 'Many Sass!');

License

gulp-notify-growl is licensed under the MIT License.