Skip to content

Commit

Permalink
Output number of chunks, see #1354
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 24, 2024
1 parent f34b974 commit c70de16
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/scripts/transpile-swc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Usage:
* cd chipper/
* npx tsx js/scripts/transpile-swc.ts
* sage run js/scripts/transpile-swc.ts
*
* @author Sam Reid (PhET Interactive Simulations)
* @author Michael Kauzmann (PhET Interactive Simulations)
Expand Down Expand Up @@ -73,8 +73,11 @@ const spawnWatch = ( repos: string[] ) => {
};

async function main( repos = activeRepos ): Promise<void> {
console.log( `Transpiling code for ${repos.length} repositories...` );
await Promise.all( _.chunk( repos, 75 ).map( chunkedRepos => spawnWatch( chunkedRepos ) ) );
const chunks = _.chunk( repos, 75 );

console.log( `Transpiling code for ${repos.length} repositories, split into ${chunks.length} chunks...` );

await Promise.all( chunks.map( chunkedRepos => spawnWatch( chunkedRepos ) ) );
console.log( 'SWC transpile completed successfully.' );
}

Expand Down

0 comments on commit c70de16

Please sign in to comment.