From 0883673873470b2651d0fb3f12ee9354af476855 Mon Sep 17 00:00:00 2001 From: sumeyye Date: Mon, 13 Oct 2025 15:41:26 +0300 Subject: [PATCH] update: use `parallel` parameter to get faster and safer build --- npm/ng-packs/scripts/publish.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/scripts/publish.ts b/npm/ng-packs/scripts/publish.ts index cedfcf3c44..102973d8dd 100644 --- a/npm/ng-packs/scripts/publish.ts +++ b/npm/ng-packs/scripts/publish.ts @@ -47,7 +47,22 @@ program.parse(process.argv); if (program.preview) await replaceWithPreview(program.nextVersion); - await execa('yarn', ['build', '--noInstall'], { stdout: 'inherit' }); + const parallel = process.env.NX_PARALLEL || '2'; + await execa( + 'yarn', + [ + 'nx', + 'run-many', + '--target=build', + '--all', + '--exclude=dev-app,schematics', + '--prod', + '--parallel', + String(parallel), + ], + { stdout: 'inherit', cwd: '../' }, + ); + await execa('yarn', ['build:schematics'], { stdout: 'inherit' }); } catch (error) { console.error(error.stderr);