# gulp-notifier

> Gulp success and error notifications

Latest version **1.0.6** (published 2018-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-notifier
pnpm add gulp-notifier
yarn add gulp-notifier
bun add gulp-notifier
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-10-28 |
| First published | 2018-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mark Notton |
| Maintainers | marknotton |
| Keywords | gulp, notifications, notify |

## Links

- npm: https://www.npmjs.com/package/gulp-notifier
- Repository: https://github.com/marknotton/gulp-notifier
- Issues: https://github.com/marknotton/gulp-notifier/issues
- npm.io page: https://npm.io/package/gulp-notifier

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [through2](https://npm.io/package/through2.md) ^2.0.3
- [fancy-log](https://npm.io/package/fancy-log.md) ^1.3.2
- [gulp-notify](https://npm.io/package/gulp-notify.md) ^3.2.0

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2018-10-28
- 1.0.5 — 2018-07-29
- 1.0.4-2 — 2018-05-16
- 1.0.4-1 — 2018-05-14
- 1.0.4 — 2018-05-14
- 1.0.3 — 2018-05-14
- 1.0.2 — 2018-05-14
- 1.0.1 — 2018-05-13
- 1.0.0 — 2018-05-13

## README

# Gulp Notifier

Gulp success and error notifications.

### Installation
```
npm i gulp-notifier --save
```
```js
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 | <img src="https://i.imgur.com/G6fTWAs.png" alt="Success" align="left" height="20" /> | Icon to use on success messages. Can be relative to the project folder or an absolute URL |
| error      | String | <img src="https://i.imgur.com/VsfiLjV.png" alt="Success" align="left" height="20" /> | 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() })
});
```

---
_Source: https://npm.io/package/gulp-notifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
