gulp-notify icon indicating copy to clipboard operation
gulp-notify copied to clipboard

gulp-notify: task completes only after notification disappears (Win7/8)

Open rulkens opened this issue 9 years ago • 5 comments

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.

rulkens avatar Oct 14 '15 11:10 rulkens

Hi! What does your options look like? Do you use emitError by any chance?

mikaelbr avatar Oct 14 '15 11:10 mikaelbr

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!'
            }));
    });
});

adammarr avatar Nov 04 '15 15:11 adammarr

same to me, only the notify disappeared, the files will be written.

bi-kai avatar Jul 16 '16 03:07 bi-kai

+1

randycasburn avatar Aug 04 '16 14:08 randycasburn

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.

heltonteixeira avatar Dec 12 '16 07:12 heltonteixeira