add prettier and address comments
This commit is contained in:
parent
e0a73d7fbe
commit
3f7d2336c7
3 changed files with 22 additions and 19 deletions
|
@ -11,7 +11,9 @@
|
||||||
"make": "electron-forge make",
|
"make": "electron-forge make",
|
||||||
"make:sign": "SIGN=1 electron-forge make",
|
"make:sign": "SIGN=1 electron-forge make",
|
||||||
"publish": "SIGN=1 electron-forge publish",
|
"publish": "SIGN=1 electron-forge publish",
|
||||||
"lint": "eslint --ext .ts,.tsx ."
|
"lint": "eslint --ext .ts,.tsx .",
|
||||||
|
"format": "prettier --check . --ignore-path .gitignore",
|
||||||
|
"format:fix": "prettier --write . --ignore-path .gitignore"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": {
|
"author": {
|
||||||
|
|
4
app/src/declarations.d.ts
vendored
4
app/src/declarations.d.ts
vendored
|
@ -1,4 +1,4 @@
|
||||||
declare module '*.svg' {
|
declare module '*.svg' {
|
||||||
const content: string;
|
const content: string
|
||||||
export default content;
|
export default content
|
||||||
}
|
}
|
|
@ -115,14 +115,15 @@ function server() {
|
||||||
logger.error(data.toString().trim())
|
logger.error(data.toString().trim())
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function restart(code: number) {
|
||||||
proc.on('exit', (code) => {
|
logger.info(`Server exited with code: ${code}`)
|
||||||
logger.error(`Server exited with code: ${code}`)
|
|
||||||
setTimeout(server, 3000)
|
setTimeout(server, 3000)
|
||||||
})
|
}
|
||||||
|
|
||||||
|
proc.on('exit', code => restart(code))
|
||||||
|
|
||||||
app.on('before-quit', () => {
|
app.on('before-quit', () => {
|
||||||
proc.off('exit', server)
|
proc.off('exit', code => restart(code))
|
||||||
proc.kill()
|
proc.kill()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue