1.0.0 • Published 9 years ago
gulp-browser-notification v1.0.0
#gulp-browser-notification
Show notifications in your browser

Install
npm install --save-dev gulp-browser-notificationUsage
Import
var browserNotification = require('gulp-browser-notification');Addinig connect/express middleware
app.use(browserNotification.connect());Adding to tasks
gulp.task('example-taks', function() {
return gulp.src('/html/*.html')
.pipe(browserNotification('the html has changed!'));
});you can also call a function
gulp.task('example-taks', function() {
return gulp.src('/html/*.html')
.pipe(browserNotification.notify(function(file) {
return {
title: 'the html has changed! ' + file.path
}
}))
});options
changing port
- Type:
Integer - Default: 35728
app.use(browserNotification.connect({
port: 35728
}));adding options to the notification
.pipe(browserNotification.notify("Hi!"), {
body: "notification body"
})with function
.pipe(browserNotification.notify(function(file) {
return {
title: file.path,
options: {
body: "notification body"
}
}
}))1.0.0
9 years ago