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 - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

5

CHANGELOG.md
Changelog
===
#### `v2.1.0`
1. Adds `click` and `timeout` events to `notify` object.
#### `v2.0.1`

@@ -11,4 +14,2 @@ 1. Now `onError()` calls `.emit('end')` for you on the stream. Making watching and usage easier.

#### `v1.8.0`

@@ -15,0 +16,0 @@ 1. Changes notification to continue stream at once (unless when using the stream - i.e. when emitting errors)

@@ -19,2 +19,12 @@

notify.on('click', function (options) {
console.log('I clicked something!', options);
});
gulp.task("click", function () {
// Click event only makes sense if wait is true...
return gulp.src("../test/fixtures/1.txt")
.pipe(notify({ message: 'Hello 1', wait: true }));
});
gulp.task("message", function () {

@@ -21,0 +31,0 @@ return gulp.src("../test/fixtures/1.txt")

2

index.js

@@ -8,3 +8,3 @@ var api = require('./lib/extra_api');

var fn = function (i) { return function () { return i; }; };
var fn = function (i) { return function () { return i; }; };
var noopError = fn(function (err) {});

@@ -11,0 +11,0 @@ var noopStream = function () { return through.obj(); };

@@ -1,10 +0,11 @@

var through = require("through2");
"use strict";
var through = require('through2');
var report = require('./report');
var extra = require('./extra_api');
var notifier = require("node-notifier");
var notifier = require('node-notifier');
"use strict";
module.exports = function (options) {
var reporter;
var lastFile = null;

@@ -19,3 +20,2 @@ options = options || {};

}
var lastFile = null;

@@ -86,3 +86,3 @@ function notify (file, enc, callback) {

extra.logError({
title: "Error in notifier",
title: 'Error in notifier',
message: err

@@ -92,1 +92,8 @@ }, true);

};
module.exports.on = function (event, fn) {
if (!notifier) return;
return notifier.on(event, function (notifyObject, options) {
return fn(options);
});
};
{
"name": "gulp-notify",
"version": "2.0.1",
"version": "2.1.0",
"description": "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",

@@ -35,3 +35,3 @@ "keywords": [

"lodash.template": "~2.4.1",
"node-notifier": "^4.0.0",
"node-notifier": "^4.0.3",
"node.extend": "^1.0.9",

@@ -41,6 +41,6 @@ "through2": "^1.0.0"

"devDependencies": {
"mocha": "^1.19.0",
"should": "^3.3.2",
"gulp": "^3.6.2",
"gulp-plumber": "^0.6.2"
"gulp-plumber": "^0.6.2",
"mocha": "^2.0.1",
"should": "^4.3.0"
},

@@ -47,0 +47,0 @@ "engines": {

@@ -43,3 +43,3 @@ # gulp-notify [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]

* **Mac OS X**: No external installation needed (if Mac OS X 10.8 or higher).
* **Linux**: `notify-send`/`notify-osd` should be installed (On Ubuntu this is installed per default)
* **Linux**: `notify-send`/`notify-osd` should be installed (On Ubuntu this is installed per default)
* **Windows**: Uses native toaster (if Windows 8 or higher).

@@ -120,3 +120,3 @@ * **Fallback: Growl**: Growl (for Mac, Windows or similar) should be installed.

*Options are passed onto the reporter, so on Windows, you can define
Growl host, on Mac you can pass in contentImage, and so on.
Growl host, on Mac you can pass in contentImage, and so on.

@@ -149,3 +149,3 @@ See [node-notifier](https://github.com/mikaelbr/node-notifier)

the default `false` is set, the error will not be emitted
but simply printed to the console.
but simply printed to the console.

@@ -215,2 +215,26 @@ This means you can run the notifier on a CI system without

### notify.on(event, function (notificationOptions)) - Events
**If the `wait` option is set to `true`**, the notifier will tigger
events `click` or `timeout`, whether the user clicks the notification or it
times out. You listen to these events on the main notify object, not the
produces stream.
```js
var notify = require('gulp-notify');
notify.on('click', function (options) {
console.log('I clicked something!', options);
});
notify.on('timeout', function (options) {
console.log('The notification timed out', options);
});
gulp.task("click", function () {
return gulp.src("some/glob/**")
.pipe(notify({ message: 'Click or wait', wait: true }));
});
```
### notify.withReporter(Function)

@@ -217,0 +241,0 @@ Type: `Reporter`

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