Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-notify

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-notify

A plugin for Gulp to send messages to Mac Notification Center

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
86K
increased by2.45%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-notify NPM version Build Status Dependency Status

notification plugin for gulp

Information

Packagegulp-notify
DescriptionSend messages to Mac Notification center using the node-notifier module. Can also specify custom notifier (e.g. Growl notification).
Node Version>= 0.8

Note: Without overriding the notifier, Mac OS X >= 10.8 is required for this to run.

Usage

First, install gulp-notify as a development dependency:

npm install --save-dev gulp-notify

Then, add it to your gulpfile.js:


var notify = require("gulp-notify");
gulp.src("./src/test.ext")
  .pipe(notify({
    message: "Hello Gulp!"
  }));

API

notify(String)

A message to notify per data on stream.

notify(Function)

Type: function(file)

The result of the function is used as message. File from gulp stream passed in as argument.

notify(options)

options.onLast

Type: Boolean
Default: false

If the notification should only happen on the last file of the stream. Per default a notification is triggered on each file.

options.message

Type: String
Default: File path in stream

The message you wish to attach to file.

options.title

Type: String
Default: "Gulp Notification"

The title of the notification

options.notifier

Type: Function(options, callback)
Default: node-notifier module

Swap out the notifier by passing in an function. The function expects two arguments: options and callback.

The callback must be called when the notification is finished. Options will contain both title and message.

notify.onError()

Same API as using notify(), but instead of being passed vinyl File an error object gets sent.

Example:

gulp.src("../test/fixtures/*")
      .pipe(through(function () {
        this.emit("error", "Something happend: Error message!")
      }))
      .on("error", notify.onError(function (error) {
        return "Message to the notifier: " + error.message;
      }));

License

MIT License

Keywords

FAQs

Package last updated on 16 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc