import chalk from 'chalk'; import spawn from 'cross-spawn'; import path from 'path'; // ts-node scripts/build-app-domain & npm link ./app-domain console.log(`${chalk.greenBright(`build oak-app-domain`)}`); const result = spawn.sync( 'ts-node', [path.resolve(__dirname, './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); }