add binary, fix #247

cmd.js is mostly taken from node_modules/electron-prebuilt/cli.js (what the node_modules/.bin/electron symlink points to)
This commit is contained in:
Romain Beaumont
2016-03-28 02:26:13 +02:00
parent 2341749074
commit 391a2004f4
3 changed files with 15 additions and 2 deletions

10
bin/cmd.js Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env node
var electron = require('electron-prebuilt')
var proc = require('child_process')
var path = require('path')
var child = proc.spawn(electron, [path.join(__dirname, '..')], {stdio: 'inherit'})
child.on('close', function (code) {
process.exit(code)
})

View File

@@ -76,7 +76,7 @@ var all = {
prune: true,
// The Electron version with which the app is built (without the leading 'v')
version: pkg.devDependencies['electron-prebuilt']
version: pkg.dependencies['electron-prebuilt']
}
var darwin = {