gulp-notify
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -1,3 +0,3 @@ | ||
var through = require("through2"); | ||
var gutil = require("gulp-util"); | ||
var fancyLog = require('fancy-log'); | ||
var colors = require('ansi-colors'); | ||
var notifier = require("node-notifier"); | ||
@@ -12,3 +12,3 @@ var report = require("./report"); | ||
// Default logger | ||
var fnLog = gutil.log; | ||
var fnLog = fancyLog; | ||
@@ -20,6 +20,6 @@ var logError = module.exports.logError = function (options, isError) { | ||
color = isError ? "red" : "green"; | ||
if (!gutil.colors[color]) return; | ||
fnLog(gutil.colors.cyan('gulp-notify') + ':', | ||
'[' + gutil.colors.blue(options.title) + ']', | ||
gutil.colors[color].call(gutil.colors, options.message) | ||
if (!colors[color]) return; | ||
fnLog(colors.cyan('gulp-notify') + ':', | ||
'[' + colors.blue(options.title) + ']', | ||
colors[color].call(colors, options.message) | ||
); | ||
@@ -26,0 +26,0 @@ }; |
var template = require("lodash.template"); | ||
var gutil = require("gulp-util"); | ||
var PluginError = require('plugin-error'); | ||
var api = require("./extra_api"); | ||
@@ -23,3 +23,3 @@ var extend = require("node.extend"); | ||
callback = callback || function () {}; | ||
if (!reporter) return callback(new gutil.PluginError("gulp-notify", "No reporter specified.")); | ||
if (!reporter) return callback(new PluginError("gulp-notify", "No reporter specified.")); | ||
@@ -34,7 +34,7 @@ // Try/catch the only way to go to ensure catching all errors? Domains? | ||
reporter(options, function (err) { | ||
if (err) return callback(new gutil.PluginError("gulp-notify", err)); | ||
if (err) return callback(new PluginError("gulp-notify", err)); | ||
return callback(); | ||
}); | ||
} catch (err) { | ||
return callback(new gutil.PluginError("gulp-notify", err)); | ||
return callback(new PluginError("gulp-notify", err)); | ||
} | ||
@@ -71,7 +71,7 @@ }; | ||
return extend(defaults.regular, outputData, { | ||
title: gutil.template(title, { | ||
title: template(title)({ | ||
file: object, | ||
options: templateOptions | ||
}), | ||
message: gutil.template(message, { | ||
message: template(message)({ | ||
file: object, | ||
@@ -111,3 +111,3 @@ options: templateOptions | ||
} | ||
if (typeof outputData.subtitle === "function") { | ||
@@ -118,3 +118,3 @@ subtitle = outputData.subtitle(object); | ||
} | ||
if (typeof outputData.open === "function") { | ||
@@ -125,3 +125,3 @@ open = outputData.open(object); | ||
} | ||
if (typeof outputData.message === "function") { | ||
@@ -128,0 +128,0 @@ message = outputData.message(object); |
@@ -1,2 +0,2 @@ | ||
var gutil = require("gulp-util"); | ||
var PluginError = require('plugin-error'); | ||
var api = require("./extra_api"); | ||
@@ -6,3 +6,3 @@ var notify = require("./notify"); | ||
module.exports = function (reporter) { | ||
if (!reporter) throw new gutil.PluginError("gulp-notify", "No custom reporter defined."); | ||
if (!reporter) throw new PluginError("gulp-notify", "No custom reporter defined."); | ||
@@ -9,0 +9,0 @@ var inner = function (options) { |
{ | ||
"name": "gulp-notify", | ||
"version": "3.0.0", | ||
"version": "3.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", | ||
@@ -34,6 +34,8 @@ "keywords": [ | ||
"dependencies": { | ||
"gulp-util": "^3.0.8", | ||
"ansi-colors": "^1.0.1", | ||
"fancy-log": "^1.3.2", | ||
"lodash.template": "^4.4.0", | ||
"node-notifier": "^5.0.1", | ||
"node.extend": "^1.1.6", | ||
"plugin-error": "^0.1.2", | ||
"through2": "^2.0.3" | ||
@@ -45,3 +47,4 @@ }, | ||
"mocha": "^3.2.0", | ||
"should": "^11.2.0" | ||
"should": "^11.2.0", | ||
"vinyl": "^2.1.0" | ||
}, | ||
@@ -48,0 +51,0 @@ "engines": { |
@@ -8,3 +8,4 @@ /*global describe, it*/ | ||
plumber = require('gulp-plumber'), | ||
gutil = require('gulp-util'), | ||
PluginError = require('plugin-error'), | ||
Vinyl = require('vinyl'), | ||
join = require('path').join, | ||
@@ -56,3 +57,3 @@ fs = require('fs'), | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/fixtures/1.txt", | ||
@@ -84,3 +85,3 @@ cwd: "test/", | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/fixtures/1.txt", | ||
@@ -263,3 +264,3 @@ cwd: "test/", | ||
var testString = "some exception", | ||
expectedFile = new gutil.File({ | ||
expectedFile = new Vinyl({ | ||
path: "test/fixtures/1.txt", | ||
@@ -385,3 +386,3 @@ cwd: "test/", | ||
it('should handle streamed files', function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/fixtures/1.txt", | ||
@@ -421,3 +422,3 @@ cwd: "test/", | ||
it('should support lodash template for titles and messages', function (done) { | ||
var expectedFile = new gutil.File({ | ||
var expectedFile = new Vinyl({ | ||
path: "test/fixtures/1.txt", | ||
@@ -581,3 +582,3 @@ cwd: "test/", | ||
.pipe(through.obj(function (file, enc, cb) { | ||
this.emit("error", new gutil.PluginError("testPlugin", "foo")); | ||
this.emit("error", new PluginError("testPlugin", "foo")); | ||
cb(); | ||
@@ -606,3 +607,3 @@ })) | ||
.pipe(through.obj(function (file, enc, cb) { | ||
this.emit("error", new gutil.PluginError("testPlugin", "foo")); | ||
this.emit("error", new PluginError("testPlugin", "foo")); | ||
cb(); | ||
@@ -660,3 +661,3 @@ })) | ||
.pipe(through.obj(function (file, enc, cb) { | ||
this.emit("error", new gutil.PluginError("testPlugin", testMessage)); | ||
this.emit("error", new PluginError("testPlugin", testMessage)); | ||
cb(); | ||
@@ -685,3 +686,3 @@ })) | ||
.pipe(through.obj(function (file, enc, cb) { | ||
this.emit("error", new gutil.PluginError("testPlugin", testMessage)); | ||
this.emit("error", new PluginError("testPlugin", testMessage)); | ||
cb(); | ||
@@ -712,3 +713,3 @@ })) | ||
.pipe(through.obj(function (file, enc, cb) { | ||
this.emit("error", new gutil.PluginError("testPlugin", testMessage)); | ||
this.emit("error", new PluginError("testPlugin", testMessage)); | ||
cb(); | ||
@@ -736,3 +737,3 @@ })) | ||
icon: expectedIcon, | ||
})(new gutil.PluginError("testPlugin", testMessage)); | ||
})(new PluginError("testPlugin", testMessage)); | ||
}); | ||
@@ -753,3 +754,3 @@ | ||
icon: expectedIcon, | ||
})(new gutil.PluginError("testPlugin", testMessage)); | ||
})(new PluginError("testPlugin", testMessage)); | ||
}); | ||
@@ -776,3 +777,3 @@ | ||
.pipe(through.obj(function (file, enc, cb) { | ||
this.emit("error", new gutil.PluginError("testPlugin", "test")); | ||
this.emit("error", new PluginError("testPlugin", "test")); | ||
cb(); | ||
@@ -779,0 +780,0 @@ })) |
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
1107
95345
7
5
22
+ Addedansi-colors@^1.0.1
+ Addedfancy-log@^1.3.2
+ Addedplugin-error@^0.1.2
+ Addedansi-colors@1.1.0(transitive)
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedarr-diff@1.1.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@2.1.0(transitive)
+ Addedarray-slice@0.2.3(transitive)
+ Addedextend-shallow@1.1.4(transitive)
+ Addedkind-of@1.1.0(transitive)
+ Addedplugin-error@0.1.2(transitive)
- Removedgulp-util@^3.0.8
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedvinyl@0.5.3(transitive)