Implement cli parser

This commit is contained in:
Asher
2020-02-06 18:26:07 -06:00
parent 26f8216ec8
commit 256419004d
5 changed files with 359 additions and 47 deletions

View File

@ -330,7 +330,7 @@ class Builder {
if (server) {
server.kill()
}
const s = cp.fork(path.join(this.rootPath, "out/node/entry.js"), process.argv.slice(2))
const s = cp.fork(path.join(this.rootPath, "out/node/entry.js"), process.argv.slice(3))
console.log(`[server] spawned process ${s.pid}`)
s.on("exit", () => console.log(`[server] process ${s.pid} exited`))
server = s