change open way of source
This commit is contained in:
parent
40bcdd6898
commit
cdde8c9c3d
@ -13,18 +13,21 @@ const createServer = () => {
|
|||||||
let projectHome = resultObject.data.projectHome
|
let projectHome = resultObject.data.projectHome
|
||||||
console.log(projectHome)
|
console.log(projectHome)
|
||||||
|
|
||||||
const code = spawn('code', [projectHome])
|
{
|
||||||
code.stdout.on('data', (data) => {
|
const code = spawn('code', [projectHome, projectHome + "/src/Snake.ts"])
|
||||||
console.log(`stdout: ${data}`)
|
code.stdout.on('data', (data) => {
|
||||||
})
|
console.log(`stdout: ${data}`)
|
||||||
|
})
|
||||||
|
|
||||||
code.stderr.on('data', (data) => {
|
code.stderr.on('data', (data) => {
|
||||||
console.error(`stderr: ${data}`)
|
console.error(`stderr: ${data}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
code.on('close', (code) => {
|
||||||
|
console.log(`child process exited with code ${code}`)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
code.on('close', (code) => {
|
|
||||||
console.log(`child process exited with code ${code}`)
|
|
||||||
});
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user