Last active
November 5, 2018 01:21
-
-
Save sebnitu/79c3f10ce6ae0f07bf34b88479bb5981 to your computer and use it in GitHub Desktop.
Gulp 4 workaround for updating atime and mtime on dest files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) | |
})) | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to @WraithKenny for this workaround!