oak-general-business/scripts/make.ts

23 lines
675 B
TypeScript

import chalk from 'chalk';
import spawn from 'cross-spawn';
// ts-node scripts/build-app-domain & npm link ./app-domain
console.log(`${chalk.greenBright(`build general-app-domain`)}`);
const result = spawn.sync(
'ts-node',
[require.resolve('./buildGeneralEntityDict.ts')],
{
stdio: 'inherit',
shell: true,
}
);
// const result2 = spawn.sync('npm -v', [], { stdio: 'inherit', shell: true });
if (result.status === 0) {
console.log(`${chalk.greenBright(`build 执行完成`)}`);
} else {
Error(`${chalk.redBright(`build 执行失败`)}`);
process.exit(1);
}