blueju ac881145cf
chore: npm run setup 和 npm run start 命令适配 win 系统 (#574)
* chore: npm run setup & npm run start 命令适配 win 系统

* chore: 补上漏掉的 await

* chore: 参考 antfu 大神的轮子 ni 源码,改用更为知名的命令行库

* chore: npm run start 命令适配 win 系统

* chore: 调整样式
2022-06-01 13:55:22 +08:00

11 lines
401 B
JavaScript

#!/usr/bin/env node
const os = require('os');
const execa = require('execa');
async function start() {
const [, , pkgName = '@alilc/lowcode-ignitor'] = process.argv;
await execa.command(`lerna exec --scope ${pkgName} -- npm start`, { stdio: 'inherit', encoding: 'utf-8' });
}
os.type() === 'Windows_NT' ? start() : execa.command('scripts/start.sh', { stdio: 'inherit', encoding: 'utf-8' });