
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
gulp-notify
Advanced tools
A plugin for Gulp to send messages to Mac Notification Center or Linux' notify-send
notification plugin for gulp
Package | gulp-notify |
---|---|
Description | Send messages to Mac Notification Center or Linux notifications (using notify-send ) 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 or as of v0.3.2, Linux with notify-send
installaed is required for this to run.
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!"
}));
A message to notify per data on stream.
Type: function(file)
The result of the function is used as message. File from gulp stream passed in as argument.
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.
Type: String
Default: File path in stream
The message you wish to attach to file.
Type: String
Default: "Gulp Notification"
The title of the notification
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.
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;
}));
To see all examples run from root:
$ gulp --gulpfile examples/gulpfile.js --tasks
[gulp] Using file /Users/example/gulp-notify/examples/gulpfile.js
[gulp] Working directory changed to /Users/example/gulp-notify/examples
[gulp] Tasks for /Users/example/gulp-notify/examples/gulpfile.js
[gulp] ├── multiple
[gulp] ├── one
[gulp] ├── message
[gulp] ├── function
[gulp] ├── onlast
[gulp] └── error
To run an example:
$ gulp --gulpfile examples/gulpfile.js multiple
[gulp] Using file /Users/example/gulp-notify/examples/gulpfile.js
[gulp] Working directory changed to /Users/example/gulp-notify/examples
[gulp] Running 'multiple'...
[gulp] Finished 'multiple' in 3.75 ms
FAQs
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
We found that gulp-notify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.