Skip to content

Instantly share code, notes, and snippets.

@sebnitu
Last active November 5, 2018 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebnitu/79c3f10ce6ae0f07bf34b88479bb5981 to your computer and use it in GitHub Desktop.
Save sebnitu/79c3f10ce6ae0f07bf34b88479bb5981 to your computer and use it in GitHub Desktop.
Gulp 4 workaround for updating atime and mtime on dest files.
// npm install --save-dev through2
import through2 from 'through2'
// Add this pipe before your gulp.dest() call
// ...
.pipe(through2.obj(function(file, enc, cb) {
var date = new Date()
file.stat.atime = date
file.stat.mtime = date
cb(null, file)
}))
// ...
@sebnitu
Copy link
Author

sebnitu commented Nov 5, 2018

Thanks to @WraithKenny for this workaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment