A gulp plugin to update file modification timestamps. Compatible with gulp 4 and 5.
npm install @recranet/gulp-touchconst gulp = require('gulp');
const touch = require('@recranet/gulp-touch');
exports.default = function () {
return gulp.src('src/**/*')
.pipe(touch())
.pipe(gulp.dest('dist'));
};Updates the mtime (modification time) on each file's stat object to the current time. It does not modify files on disk directly, instead it updates the timestamp on the in-memory file stream so that dest() writes the file with the updated modification time.
MIT