From: Dan Allen Date: Sun, 29 Nov 2020 00:37:35 +0000 (-0700) Subject: fix reducer that computes mtime for combined CSS file X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a8e4145d534af3886802a5ccb7297c23d2b07299;p=eg-antora.git fix reducer that computes mtime for combined CSS file --- 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([