Skip to content

Commit

Permalink
Promise.all parallelizes the read phase
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Sep 17, 2024
1 parent a924729 commit 820f5cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ iterator(function (srcname, name, variant, meta) {
});
});

(async function () {
for (var build of builders) await build.number.read();
Promise.all(builders.map((build) => build.number.read())).then(function () {
builders.forEach(function (build) {
build.number.write(build.out).then(build.then, build.catch);
});
})();
});

fs.writeFileSync(
`${__dirname}/../docs/index.md`,
Expand Down

0 comments on commit 820f5cf

Please sign in to comment.