-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gulp 4.0 branch is incompatible with imagemin-mozjpeg and gulp-changed/gulp-newer #6
Comments
Can you show us your gulpfile? |
Here's a snippet: gulp.task(function mozjpeg() {
var mozjpeg = require('imagemin-mozjpeg');
return gulp.src(path.join(config.src, '**/*.{jpg,jpeg}'))
.pipe(changed(config.dest))
.pipe(mozjpeg(config.mozjpeg.options)())
.pipe(debug({title: 'mozjpeg:'}))
.pipe(gulp.dest(config.dest));
}); |
So I checked mtime/atime between imagemin-mozjpeg and a plugin that was working (ttf2woff) and it appears that neither updates the mtime, but ttf2woff is updating the atime. Now I'm confused. |
I guess this issue is not directly related to this plugin. However, if you create a small repository by which we can reproduce the problem, I'll check it when I have a time. |
So after doing some testing I was able to determine that this is caused by using the gulp 4.0 branch. Is there some option in gulpjs/gulp#4.0 that I'm missing? |
Hmm, I haven't try gulp 4 yet and probably gulp team can help you better. https://github.com/gulpjs/gulp/issues Hope you find the root cause. |
It appears that the mtime of files passed through mozjpeg is not updated, so gulp-changed (or gulp-newer) can't detect if there are newer files.
The text was updated successfully, but these errors were encountered: