Skip to content

Commit fe1d571

Browse files
authored
Merge pull request #23942 from abpframework/issue/fix-publish-script
Angular - Fixing the publish script to make the build phase run parallel
2 parents dcdcbc1 + 0883673 commit fe1d571

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

npm/ng-packs/scripts/publish.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,22 @@ program.parse(process.argv);
4747

4848
if (program.preview) await replaceWithPreview(program.nextVersion);
4949

50-
await execa('yarn', ['build', '--noInstall'], { stdout: 'inherit' });
50+
const parallel = process.env.NX_PARALLEL || '2';
51+
await execa(
52+
'yarn',
53+
[
54+
'nx',
55+
'run-many',
56+
'--target=build',
57+
'--all',
58+
'--exclude=dev-app,schematics',
59+
'--prod',
60+
'--parallel',
61+
String(parallel),
62+
],
63+
{ stdout: 'inherit', cwd: '../' },
64+
);
65+
5166
await execa('yarn', ['build:schematics'], { stdout: 'inherit' });
5267
} catch (error) {
5368
console.error(error.stderr);

0 commit comments

Comments
 (0)