electron-workers
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -121,2 +121,4 @@ | ||
this._electronInstances.push(new _ElectronWorker2['default']({ | ||
debug: this.options.debug, | ||
debugBrk: this.options.debugBrk, | ||
electronArgs: this.options.electronArgs, | ||
@@ -123,0 +125,0 @@ pathToElectron: this.options.pathToElectron, |
@@ -107,2 +107,4 @@ 'use strict'; | ||
var host = _options.host; | ||
var debug = _options.debug; | ||
var debugBrk = _options.debugBrk; | ||
@@ -112,2 +114,8 @@ childArgs = electronArgs.slice(); | ||
if (debugBrk != null) { | ||
childArgs.unshift('--debug-brk=' + debugBrk); | ||
} else if (debug != null) { | ||
childArgs.unshift('--debug=' + debug); | ||
} | ||
childOpts = { | ||
@@ -125,2 +133,3 @@ env: {} | ||
childOpts.env[portEnvVarName] = port; | ||
childOpts.env.ELECTRON_WORKER_ID = _this.id; | ||
@@ -127,0 +136,0 @@ /* eslint-disable no-unused-vars */ |
{ | ||
"name": "electron-workers", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Run electron scripts in managed workers", | ||
@@ -38,5 +38,4 @@ "main": "lib/index.js", | ||
"babel": "5.8.29", | ||
"babel-eslint": "4.1.3", | ||
"eslint": "1.7.3", | ||
"eslint-config-airbnb": "0.1.0", | ||
"eslint": "1.9.0", | ||
"eslint-config-airbnb": "1.0.0", | ||
"mocha": "2.3.3", | ||
@@ -43,0 +42,0 @@ "npm-run-all": "1.2.12", |
@@ -19,4 +19,7 @@ # electron-workers | ||
var port = process.env.ELECTRON_WORKER_PORT, | ||
host = process.env.ELECTRON_WORKER_HOST; | ||
host = process.env.ELECTRON_WORKER_HOST, | ||
workerId = process.env.ELECTRON_WORKER_ID; // worker id useful for logging | ||
console.log('Hello from worker', workerId); | ||
app.on('ready', function() { | ||
@@ -64,2 +67,4 @@ // you can use any webserver library/framework you like (connect, express, hapi, etc) | ||
`pathToElectron` - path to the electron executable, by default we will try to find the path using the value returned from `electron-prebuilt` or the value in your `$PATH`<br/> | ||
`debug` Number - pass debug port to electron process, [see electron's debugging guide](http://electron.atom.io/docs/v0.34.0/tutorial/debugging-main-process/)<br/> | ||
`debugBrk` Number - pass debug-brk port to electron process, [see electron's debugging guide](http://electron.atom.io/docs/v0.34.0/tutorial/debugging-main-process/)<br/> | ||
`electronArgs` Array - pass custom arguments to the electron executable. ej: `electronArgs: ['--some-value=2', '--enable-some-behaviour']`<br/> | ||
@@ -66,0 +71,0 @@ `timeout` - execution timeout in ms<br/> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27702
7
434
91