-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.js
More file actions
19 lines (17 loc) · 560 Bytes
/
start.js
File metadata and controls
19 lines (17 loc) · 560 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env node
const os = require('os');
const execa = require('execa');
async function start() {
const [, , pkgName = '@felce/lowcode-react-simulator-renderer'] = process.argv;
await execa.command(`lerna exec --scope ${pkgName} -- pnpm build:watch`, {
stdio: 'inherit',
encoding: 'utf-8',
});
await execa.command(`lerna exec --scope ${pkgName} -- pnpm preview`, {
stdio: 'inherit',
encoding: 'utf-8',
});
}
os.type() === 'Windows_NT'
? start()
: execa.command('scripts/start.sh', { stdio: 'inherit', encoding: 'utf-8' });