Skip to content

Commit 0e6990e

Browse files
committed
1 parent 8c961bf commit 0e6990e

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

cli.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env node
2+
3+
var electron = require('./')
4+
5+
var proc = require('child_process')
6+
7+
var child = proc.spawn(electron, process.argv.slice(2), { stdio: 'inherit', windowsHide: false })
8+
child.on('close', function (code) {
9+
process.exit(code)
10+
})
11+
12+
const handleTerminationSignal = function (signal) {
13+
process.on(signal, function signalHandler () {
14+
if (!child.killed) {
15+
child.kill(signal)
16+
}
17+
})
18+
}
19+
20+
handleTerminationSignal('SIGINT')
21+
handleTerminationSignal('SIGTERM')

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "LanGong",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)