fix: pipe via console.log with --enable-logging
This commit is contained in:
1 parent
3f40697795
commit
d95db24c8e
2 files changed
+3
-3
No files matched your search
@@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "electron .",
|
"dev": "electron --enable-logging .",
|
||||||
"build": "electron-builder --win portable"
|
"build": "electron-builder --win portable"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
+2
-2
@@ -33,8 +33,8 @@ function startBackend() {
|
|||||||
env: { ...process.env, PORT: process.env.PORT || '3000' },
|
env: { ...process.env, PORT: process.env.PORT || '3000' },
|
||||||
windowsHide: true,
|
windowsHide: true,
|
||||||
})
|
})
|
||||||
backend.stdout.pipe(process.stdout)
|
backend.stdout.on('data', (d) => console.log(d.toString().trimEnd()))
|
||||||
backend.stderr.pipe(process.stderr)
|
backend.stderr.on('data', (d) => console.error(d.toString().trimEnd()))
|
||||||
isRunning = true
|
isRunning = true
|
||||||
updateMenu()
|
updateMenu()
|
||||||
backend.on('exit', () => { backend = null; isRunning = false; updateMenu() })
|
backend.on('exit', () => { backend = null; isRunning = false; updateMenu() })
|
||||||
|
|||||||
Reference in new issue
Block a user