From ebe3ec6b5e8d4c620d40f820b951dd6c9bdbca55 Mon Sep 17 00:00:00 2001 From: Ken Newman Date: Wed, 22 Apr 2020 23:12:23 -0400 Subject: [PATCH] Set appropriate file stat times (#763) * Set appropriate file stat times Since we are creating the destination file, it's our responsibility to set the file stat times. * fix code style --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 6bdb7ea..b0aed3b 100644 --- a/index.js +++ b/index.js @@ -99,6 +99,10 @@ const gulpSass = (options, sync) => through.obj((file, enc, cb) => { // eslint-d file.contents = sassObj.css; // eslint-disable-line no-param-reassign file.path = replaceExtension(file.path, '.css'); // eslint-disable-line no-param-reassign + if (file.stat) { + file.stat.atime = file.stat.mtime = file.stat.ctime = new Date(); // eslint-disable-line + } + cb(null, file); };