Update dev.js
This commit is contained in:
parent
cf8b02421f
commit
d66d86fb7c
1 changed files with 3 additions and 3 deletions
6
dev.js
6
dev.js
|
|
@ -4,8 +4,8 @@ const toRun = process.argv.slice(2).join(" ").split('---');
|
|||
|
||||
const waitForProcess = async (proc) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
proc.stdout?.on('data', console.log);
|
||||
proc.stderr?.on('data', console.error);
|
||||
proc.stdout?.on('data', (data) => process.stdout.write(data));
|
||||
proc.stderr?.on('data', (data) => process.stderr.write(data));
|
||||
proc.on('close', resolve);
|
||||
proc.on('error', reject);
|
||||
});
|
||||
|
|
@ -14,7 +14,7 @@ const waitForProcess = async (proc) => {
|
|||
(async () => {
|
||||
await waitForProcess(exec('npm run tsc test false'));
|
||||
for (let command of toRun) {
|
||||
await waitForProcess(exec(`node index.js ${command}`, {
|
||||
await waitForProcess(exec(`node index.js --service crunchy ${command}`, {
|
||||
cwd: path.join(__dirname, 'lib')
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue