gulp-error-notifier
v1.1.0
Published
Notify about errors from gulp plugins and streams
Downloads
1,104
Maintainers
Readme
gulp-error-notifier
Notify about errors from gulp plugins and streams via desktop notifications of node-notifier.
Install
npm install --save-dev gulp-error-notifier
Usage
var gulp = require('gulp');
var errorNotifier = require('gulp-error-notifier');
var jade = require('gulp-jade');
gulp.src('./src/*.jade')
.pipe(errorNotifier())
.pipe(jade())
.pipe(gulp.dest('./dist'));
API
errorNotifier()
Plumber stream with notify
as errorHandler
.
errorNotifier.notify(error)
Logs error
to console and displays error
notification.
var notify = require('gulp-error-notifier').notify;
notify(new Error('Something happened!'));
errorNotifier.handleError(stream)
Notifies on stream
'error'
event and stops it from further executing.
To be used with SASS and Browserify.
var gulp = require('gulp');
var errorNotifier = require('gulp-error-notifier')
var sass = require('gulp-sass');
gulp.src('./src/*.scss')
.pipe(errorNotifier.handleError(sass()))
.pipe(gulp.dest('./dist'));
Examples
For detailed executable examples look at examples/gulpfile.babel.js
.
cd examples
npm install
gulp --tasks
gulp example # run specific example
Contributing
All contributions are welcome. Make a pull request or open an issue.