0

I have tried gulp 3.9 and gulp 4.0. I've tried the gulp-newer plugin, the gulp-changed plugin, and the gulp 4 {since: gulp.lastRun('taskname')} syntax. None of it works. Every time I run gulp build it rebuilds every single script, even if NONE of them have been modified since the last build.

What am I doing wrong?

The gulp 3.9 gulpfile: https://github.com/supernovus/nano.js/blob/v1.5/src/build/gulp3/gulpfile.js

The gulp 4.0 gulpfile: https://github.com/supernovus/nano.js/blob/v1.5/src/build/gulp4/gulpfile.js

I've only recently moved to gulp from grunt, and love the syntax and features, but really need to get it to only process changed files!

4
  • I found the gulp-file-cache plugin which works in both gulp 3 and gulp 4 and unlike the timestamp check in gulp-newer, actually seems to work with my configuration. Problem solved. Apr 18, 2016 at 17:05
  • Now I'm more confused than ever, as while that worked on this project, on yet a different project, this method doesn't work either. Even with the disk based caches, it still recompiles every single file every single time. There is something seriously messed up with something on here. Ugh. Apr 18, 2016 at 17:28
  • Are you restarting the gulp process? such as running gulp build
    – SteveLacy
    Apr 18, 2016 at 17:31
  • Yes, the whole idea is to only compile what has been changed since the last time I ran 'gulp build'. That's why I added the disk cache. I have found that it is actually working for most files, except the source maps on CSS. I'm guessing that's simply a plugin conflict, and I'm going to ignore it for now. Apr 18, 2016 at 17:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.