UNPKG

@eklingen/vinyl-stream-notifier

Version:

Small vinyl-stream wrapper -aka Gulp plugin- for node-notifier.

41 lines (23 loc) 993 B
# Small vinyl-stream wrapper -aka Gulp plugin- for node-notifier. Run node-notifier within your streams. Useful to report errors, for example in combination with ["gulp-plumber"](https://www.npmjs.com/package/gulp-plumber). > *NOTE:* No tests have been written yet! ## Installation `yarn install`. Or `npm install`. Or just copy the files to your own project. ## Usage With `gulp-plumber`: ```javascript const notifierWrapper = require('@eklingen/vinyl-stream-notifier') return stream.pipe(plumber({ errorHandler: notifierWrapper() })) ``` With native node pipelines: ```javascript const notifierWrapper = require('@eklingen/vinyl-stream-notifier') const notify = notifier({ ...options }, () => {}) notify({ message: error }) ``` ## Options See the options of ["node-notifier"](https://www.npmjs.com/package/node-notifier). ## Dependencies This package requires ["node-notifier"](https://www.npmjs.com/package/node-notifier). --- Copyright (c) 2019 Elco Klingen. MIT License.