Closed philipptrenz closed 6 years ago
Found a solution:
#!/usr/bin/env node
var spawn = require('child_process').spawn
var join = require('path').join
var app = spawn('npm', ['start'], {
stdio: 'inherit',
cwd: join(__dirname, '..')
}).on('exit', function (i, m) {
process.exit()
})
Hey there,
I want to ship electron-prebuilt-compile within my npm package and define how to start from cli with node. What I'm searching for is something similar to this
cli.js
file:so I can define in my
package.json
I tried to just swap
electron-prebuilt
toelectron-prebuilt-compile
but it results in the following error:Any suggestions? Thanks!