npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-notifier

v1.0.6

Published

Gulp success and error notifications

Downloads

5,138

Readme

Gulp Notifier

Gulp success and error notifications.

Installation

npm i gulp-notifier --save
const notifier = require('gulp-notifier');

Usage

gulp.task('someTask', () => {
  return gulp.src([...])
  .pipe(plumber({errorHandler: notifier.error }))
  .pipe(concat('ccombined.js))
  .pipe(gulp.dest('/some/location/'))
  .pipe(notifier.success())
});

You can pass in a string or object of options. A string will be defined as the message or message shorthand.

notifier.success('js', { project : 'My Project'})

Options

| Option | Type | Default | Details | |--|--|--|--| | project | String | - | Project name. Will appear as a subheading | | exclusions | String | - | Files that match any part of this string will be excluded from any notification | | extra | Array or String| - | Manually add extra files to log out, regardless of whether they actually part of the stream | | prefix | String | - | String to add before the notification message | | suffix | String | - | String to add after the notification message | | popups | Bool | true | Prevent popups from showing. Console logs will still be rendered. Remote servers won't need popups and may even cause errors. | | delay | Bool | false | If set to true, all console messages will be logged into a array. All logs can then be triggers using the logs function | | success | String | | Icon to use on success messages. Can be relative to the project folder or an absolute URL | | error | String | | Icon to use on error messages. Can be relative to the project folder or an absolute URL | | messages | String | Files compiled successfully | The message you want to display. This can be a shorthand name that references an object key defined in the defaults function (see below) |

Defaults

You can define all your own default options outside of the stream.

notifier.defaults({
  project : 'My Project,
  success : 'images/icon.png',
  exclusions:'.map',
  messages  : {
    js      : 'Javascripts are all done!',
    sass    : 'Looking gooooood!'
  }
});

Logs

The logs function will log out all previously saved console messages. Designed to be used in conjunction with Gulps on end feature.

gulp.task('someTask', () => {
  return gulp.src([...])
  .pipe(notifier.success())
  .on('end', () => { notifier.logs() })
});