Gaëtan Renaudeau
7 years ago
committed by
GitHub
6 changed files with 62 additions and 16 deletions
@ -0,0 +1,3 @@ |
|||
#/bin/bash |
|||
|
|||
yarn compile && DEBUG=electron-builder electron-builder --dir -c.compression=store -c.mac.identity=null |
@ -1,5 +1,5 @@ |
|||
#/bin/bash |
|||
|
|||
concurrently --raw \ |
|||
concurrently --raw --kill-others \ |
|||
"cross-env NODE_ENV=development webpack-cli --mode development --watch --config webpack/internals.config.js" \ |
|||
"cross-env NODE_ENV=development electron-webpack dev" |
|||
|
@ -0,0 +1,32 @@ |
|||
// @flow
|
|||
|
|||
// <((((((\\\
|
|||
// / . }\
|
|||
// ;--..--._|}
|
|||
// (\ '--/\--' )
|
|||
// DISCLAIMER \\ | '-' :'|
|
|||
// This is a dirty hack \\ . -==- .-|
|
|||
// \\ \.__.' \--._
|
|||
// [\\ __.--| // _/'--.
|
|||
// \ \\ .'-._ ('-----'/ __/ \
|
|||
// \ \\ / __>| | '--. |
|
|||
// \ \\ | \ | / / /
|
|||
// \ '\ / \ | | _/ /
|
|||
// \ \ \ | | / /
|
|||
// \ \ \ /
|
|||
|
|||
let MAIN_PROCESS_PID: ?number = null |
|||
let INTERNAL_PROCESS_PID: ?number = null |
|||
|
|||
function kill(processType, pid) { |
|||
console.log(`-> Killing ${processType} process ${pid}`) // eslint-disable-line no-console
|
|||
process.kill(pid, 'SIGTERM') |
|||
} |
|||
|
|||
exports.setMainProcessPID = (pid: number) => (MAIN_PROCESS_PID = pid) |
|||
exports.setInternalProcessPID = (pid: number) => (INTERNAL_PROCESS_PID = pid) |
|||
|
|||
exports.terminateAllTheThings = () => { |
|||
if (INTERNAL_PROCESS_PID) kill('internal', INTERNAL_PROCESS_PID) |
|||
if (MAIN_PROCESS_PID) kill('main', MAIN_PROCESS_PID) |
|||
} |
Loading…
Reference in new issue