gulp-notify
Advanced tools
Comparing version 2.0.0 to 2.0.1
Changelog | ||
=== | ||
#### `v2.0.1` | ||
1. Now `onError()` calls `.emit('end')` for you on the stream. Making watching and usage easier. | ||
#### `v2.0.0` | ||
@@ -5,0 +8,0 @@ 1. Major bump due to node-notifier (underlying module for doing notifications) have changed it's API and thus this has as well. |
@@ -45,3 +45,7 @@ var through = require("through2"); | ||
return function (error) { | ||
report(reporter, error, options, templateOptions, callback); | ||
var self = this; | ||
report(reporter, error, options, templateOptions, function () { | ||
callback.apply(self, arguments); | ||
self.emit && self.emit('end'); | ||
}); | ||
}; | ||
@@ -48,0 +52,0 @@ }; |
{ | ||
"name": "gulp-notify", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"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", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -290,2 +290,4 @@ # gulp-notify [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] | ||
**`onError()` will automatically end the stream for you. Making it easer for watching.** | ||
### notify.logLevel(level) | ||
@@ -292,0 +294,0 @@ Type: `Integer` |
@@ -613,2 +613,3 @@ /*global describe, it*/ | ||
it('should have onError event withReporter', function(done) { | ||
@@ -620,3 +621,17 @@ var notifier = notify.withReporter(mockGenerator); | ||
it('should call end on stream', function (done) { | ||
var onError = notify.onError({ | ||
notifier: mockGenerator(function (opts) { }) | ||
}); | ||
var stream = through.obj(function (file, enc, cb) { | ||
this.emit('error', 'error'); | ||
cb(); | ||
}); | ||
stream.on('error', onError).on('end', done); | ||
stream.write({}); | ||
}); | ||
it('should be limited by notifying on error if th onError-option is passed', function (done) { | ||
@@ -623,0 +638,0 @@ var |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91996
1053
405