Skip to content

Commit 9a92d69

Browse files
committed
fix: Process all files sequentially
Fully asynchronous mode with some throttling, if there are many input file, can be implemented later. Sequantial processing keeps the same order of processed files; alphabetical sorting could be added, when the asynchronous mode is introduced.
1 parent caff4af commit 9a92d69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tasks/tidy-html5.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ module.exports = function (grunt) {
4545
}
4646

4747
files.reduce(function (previous, file) {
48-
return file.src.reduce(process, previous)
48+
return previous.then(function () {
49+
return file.src.reduce(process, Promise.resolve())
50+
})
4951
}, Promise.resolve())
5052
.then(function () {
5153
const ok = failed ? force ? grunt.log.warn : grunt.fail.warn

0 commit comments

Comments
 (0)