From 2dbc2866e5083e952bb0d6c1f47037f6867fa390 Mon Sep 17 00:00:00 2001 From: Augustin Mauroy Date: Mon, 18 Nov 2024 17:12:36 +0100 Subject: [PATCH] add withe-spaces --- src/loader.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/loader.mjs b/src/loader.mjs index c674f14..b0e38e5 100644 --- a/src/loader.mjs +++ b/src/loader.mjs @@ -29,11 +29,13 @@ const createLoader = () => { ); const progressBar = createProgressBar('Loading files'); + progressBar.start(resolvedFiles.length, 0); return resolvedFiles.map(async filePath => { const fileContents = await readFile(filePath, 'utf-8'); progressBar.increment(); + // normally we stop the progress bar when the loop is done // but here we return the loop so we need to stop it when the last file is loaded if (progressBar.value === progressBar.total) {