change open way of source

This commit is contained in:
王劲鹏 2019-11-12 20:04:18 +08:00
parent 40bcdd6898
commit cdde8c9c3d

View File

@ -13,7 +13,8 @@ const createServer = () => {
let projectHome = resultObject.data.projectHome let projectHome = resultObject.data.projectHome
console.log(projectHome) console.log(projectHome)
const code = spawn('code', [projectHome]) {
const code = spawn('code', [projectHome, projectHome + "/src/Snake.ts"])
code.stdout.on('data', (data) => { code.stdout.on('data', (data) => {
console.log(`stdout: ${data}`) console.log(`stdout: ${data}`)
}) })
@ -24,7 +25,9 @@ const createServer = () => {
code.on('close', (code) => { code.on('close', (code) => {
console.log(`child process exited with code ${code}`) console.log(`child process exited with code ${code}`)
}); })
}
break break
} }
}) })