Socket
Book a DemoInstallSign in
Socket

gulp-browser-notification

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-browser-notification

> Show notifications in your browser

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

#gulp-browser-notification

Show notifications in your browser

notification

Install

npm install --save-dev gulp-browser-notification

Usage

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"
      }
    }
}))

All notification options

Keywords

gulpplugin

FAQs

Package last updated on 15 Dec 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.