Skip to content

Commit

Permalink
add withe-spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMauroy committed Nov 18, 2024
1 parent 4701dcb commit 2dbc286
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/loader.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2dbc286

Please sign in to comment.