(pkg: string)
| 7 | const rootDir = 'packages/' |
| 8 | |
| 9 | function build(pkg: string) { |
| 10 | try { |
| 11 | execSync(`pnpm run build`, { stdio: 'inherit', cwd: resolve(rootDir, pkg) }) |
| 12 | console.log(chalk.green(`构建成功: ${pkg}`)) |
| 13 | } catch (error) { |
| 14 | console.log(chalk.red(`构建失败: ${pkg}`)) |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | async function main() { |
| 19 | const { install } = await inquirer.prompt([ |