gulp-notify
gulp-notify copied to clipboard
gulp-notify: task completes only after notification disappears (Win7/8)
When I add gulp-notify to a task, it only completes after the notification has been clicked away or disappears after timeout. This means that tasks take a lot longer to complete when using gulp-notify and it makes it practically useless. A task that takes 500ms to complete suddenly takes 5500ms. This is especially cumbersome when running tasks in sequence.
It would be great if the notification were non-blocking, so the task can complete while the notification is still shown.
Hi! What does your options look like? Do you use emitError
by any chance?
Same issue here, here is on example where the run blocks until the windows "Yay!" notification is dismissed, any way around this?
gulp.task('sass', function() {
var onError = function(err) {
notify.onError({
title: "Gulp Sass",
subtitle: "Failure!",
message: "Error: <%= err.message %>",
sound: "Beep"
})(err);
this.emit('end');
};
//clean the css dest directory
del(['dist/css/*'], function() {
var cssfiles = gulp.src(files.scss)
.pipe(plumber({errorHandler: onError}))
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(autoprefixer())
.pipe(rev())
.pipe(sourcemaps.write('maps'))
.pipe(gulp.dest('dist/css'));
gulp.src('index.html')
.pipe(plumber({errorHandler: onError}))
.pipe(inject(cssfiles, {
read: false,
starttag: '<!-- app:css -->',
endtag: '<!-- endinject -->',
addRootSlash: false, // ensures proper relative paths
ignorePath: '/build/' // ensures proper relative paths
}))
.pipe(gulp.dest('./'))
.pipe(notify({
title: 'SASS Files Complete',
message: 'Yay!'
}));
});
});
same to me, only the notify disappeared, the files will be written.
+1
I had the same problem, but I find this site(http://learningwithjb.com/posts/notify-pop-up) and it say you need to install Growl for Windows to use gulp-notify, just installed it and now the gulp notification show for a few seconds and the gulp don't hang anymore.