gulp-community / gulp-cached

A simple in-memory file cache for gulp
MIT License
452 stars 23 forks source link

Livereload not working when using gulp-cached? #6

Closed JohEngstrom closed 10 years ago

JohEngstrom commented 10 years ago

I'm trying to implement gulp-cached to speed up my sass task but I can't seem to get it to work with livereload. Is this not meant to work?

It seems to cache it as the task goes from 4 seconds on initial run to 20 something milliseconds on subsequent runs but it's not passed to the reload pipe.

This is my SASS task:

gulp.task('styles', function () {
    return gulp.src( paths.scss )
        .pipe( cache( 'sass' ) )
        .pipe( scss( options.scss ).on( 'error', gutil.log ) )
        .pipe( autoprefix( options.autoprefix ) )
        .pipe( gulp.dest( dests.css ) )
        .pipe( connect.reload() )
        .pipe( notify( { message: 'CSS task complete.' } ) );
});

Here's my full gulp file: http://hastebin.com/ihicukigaw.coffee

yocontra commented 10 years ago

gulp-connect is a blacklisted plugin so I won't provide support for it. Use gulp-livereload.