Skip to content
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

Closed
noderat opened this issue Nov 5, 2015 · 6 comments

Comments

@noderat
Copy link

noderat commented Nov 5, 2015

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.

@shinnn
Copy link
Contributor

shinnn commented Nov 5, 2015

Can you show us your gulpfile?

@noderat
Copy link
Author

noderat commented Nov 5, 2015

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

@noderat noderat changed the title mtime is not updated causing gulp-newer to fail mtime is not updated causing gulp-changed/gulp-newer to fail Nov 5, 2015
@noderat
Copy link
Author

noderat commented Nov 5, 2015

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.

@shinnn
Copy link
Contributor

shinnn commented Nov 5, 2015

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.

@noderat
Copy link
Author

noderat commented Nov 5, 2015

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?

@shinnn
Copy link
Contributor

shinnn commented Nov 5, 2015

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.

@shinnn shinnn closed this as completed Nov 5, 2015
@noderat noderat changed the title mtime is not updated causing gulp-changed/gulp-newer to fail Gulp 4.0 branch is incompatible with imagemin-mozjpeg and gulp-changed/gulp-newer Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants