From 613b4c659695ef792f053d29b99472809aba9f0f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 7 Jul 2023 16:11:29 +0200 Subject: [PATCH] format files in parallel --- scripts/build.mjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index aead3c9531d0..0b508e2eb3af 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -66,9 +66,7 @@ async function buildNodePackage({packageDir, pkg}) { process.stdout.write(adjustToTerminalWidth(`${pkg.name}\n`)); - for (const file of files) { - await buildFile(file); - } + await Promise.all(files.map(file => buildFile(file))); assert.ok( fs.existsSync(path.resolve(packageDir, pkg.main)),