mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.6 KiB
78 lines
1.6 KiB
import program from 'commander';
|
|
import execa from 'execa';
|
|
import fse from 'fs-extra';
|
|
|
|
(async () => {
|
|
program.option('-i, --noInstall', 'skip updating package.json and installation', false);
|
|
program.option('-c, --skipNgcc', 'skip ngcc', false);
|
|
|
|
program.parse(process.argv);
|
|
|
|
try {
|
|
if (!program.noInstall) {
|
|
await execa('yarn', ['install'], { stdout: 'inherit', cwd: '../' });
|
|
}
|
|
|
|
await fse.remove('../dist');
|
|
|
|
await execa(
|
|
'yarn',
|
|
[
|
|
'nx',
|
|
'run-many',
|
|
'--target',
|
|
'build',
|
|
'--prod',
|
|
'--projects',
|
|
'core,theme-shared,components',
|
|
'--parallel',
|
|
'1',
|
|
'--skip-nx-cache',
|
|
],
|
|
{ stdout: 'inherit', cwd: '../' },
|
|
);
|
|
|
|
await execa(
|
|
'yarn',
|
|
[
|
|
'nx',
|
|
'run-many',
|
|
'--target',
|
|
'build',
|
|
'--prod',
|
|
'--projects',
|
|
'feature-management,permission-management,account-core',
|
|
'--parallel',
|
|
'1',
|
|
'--skip-nx-cache',
|
|
],
|
|
{ stdout: 'inherit', cwd: '../' },
|
|
);
|
|
|
|
await execa(
|
|
'yarn',
|
|
[
|
|
'nx',
|
|
'run-many',
|
|
'--target',
|
|
'build',
|
|
'--prod',
|
|
'--all',
|
|
'--exclude',
|
|
'dev-app,schematics,core,theme-shared,components,feature-management,permission-management,account-core',
|
|
'--parallel',
|
|
'1',
|
|
'--skip-nx-cache',
|
|
],
|
|
{ stdout: 'inherit', cwd: '../' },
|
|
);
|
|
|
|
if (!program.skipNgcc) await execa('yarn', ['compile:ivy'], { stdout: 'inherit', cwd: '../' });
|
|
} catch (error) {
|
|
console.error(error.stderr);
|
|
process.exit(1);
|
|
}
|
|
|
|
process.exit(0);
|
|
})();
|