From c70de166bc5cdac34cb43cacf4fa9e7e55c6d0d8 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Thu, 24 Oct 2024 10:21:43 -0600 Subject: [PATCH] Output number of chunks, see https://github.com/phetsims/chipper/issues/1354 --- js/scripts/transpile-swc.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/scripts/transpile-swc.ts b/js/scripts/transpile-swc.ts index 984b0e3d..8963f4c3 100644 --- a/js/scripts/transpile-swc.ts +++ b/js/scripts/transpile-swc.ts @@ -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) @@ -73,8 +73,11 @@ const spawnWatch = ( repos: string[] ) => { }; async function main( repos = activeRepos ): Promise { - 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.' ); }