From a8e4145d534af3886802a5ccb7297c23d2b07299 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sat, 28 Nov 2020 17:37:35 -0700 Subject: [PATCH] fix reducer that computes mtime for combined CSS file --- gulp.d/tasks/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp.d/tasks/build.js b/gulp.d/tasks/build.js index f9e46ee..4640a5e 100644 --- a/gulp.d/tasks/build.js +++ b/gulp.d/tasks/build.js @@ -31,7 +31,7 @@ module.exports = (src, dest, preview) => () => { .reduce((accum, { file: depPath, type }) => (type === 'dependency' ? accum.concat(depPath) : accum), []) .map((importedPath) => fs.stat(importedPath).then(({ mtime }) => mtime)) ).then((mtimes) => { - const newestMtime = mtimes.reduce((max, curr) => (!max || curr > max ? curr : max)) + const newestMtime = mtimes.reduce((max, curr) => (!max || curr > max ? curr : max), file.stat.mtime) if (newestMtime > file.stat.mtime) file.stat.mtimeMs = +(file.stat.mtime = newestMtime) }), postcssUrl([ -- 2.11.0