phantom-workers
Advanced tools
+15
-2
@@ -67,6 +67,19 @@ var childProcess = require('child_process'), | ||
| '--web-security=false', | ||
| '--ssl-protocol=any', | ||
| self.options.pathToPhantomScript | ||
| '--ssl-protocol=any' | ||
| ]; | ||
| if (self.options.proxy) { | ||
| childArgs.push('--proxy=' + self.options.proxy); | ||
| } | ||
| if (self.options['proxy-type']) { | ||
| childArgs.push('--proxy-type=' + self.options['proxy-type']); | ||
| } | ||
| if (self.options['proxy-auth']) { | ||
| childArgs.push('--proxy-auth=' + self.options['proxy-auth']); | ||
| } | ||
| childArgs.push(self.options.pathToPhantomScript); | ||
| var childOpts = { | ||
@@ -73,0 +86,0 @@ env: {} |
+1
-1
| { | ||
| "name": "phantom-workers", | ||
| "version": "0.3.2", | ||
| "version": "0.3.3", | ||
| "author": { | ||
@@ -5,0 +5,0 @@ "name": "Jan Blaha", |
+12
-1
@@ -60,6 +60,17 @@ #phantom-workers | ||
| `portEnvVarName` - customize the name of the environment variable passed to the phantom script that specifies the worker port. defaults to `PHANTOM_WORKER_PORT`<br/> | ||
| `phantomPath` - path to the phantomjs library. If not specified, this will use the version of phantom declared in the `optionalDependencies` in `package.json` | ||
| `phantomPath` - path to the phantomjs library. If not specified, this will use the version of phantom declared in the `optionalDependencies` in `package.json`<br/> | ||
| `proxy,proxy-type,proxy-auth` - see phantomjs arguments for proxy setting details | ||
| ##phantomjs2 | ||
| This package includes phantomjs 1.9.x distribution. If you like to rather use latest phantomjs you can provide it in the phantomPath option. | ||
| Install phantomjs-prebuilt and then... | ||
| ```js | ||
| var phantom = require("phantom-workers")({ | ||
| pathToPhantomScript: "script.js", | ||
| phantomPath: require("phantomjs-prebuilt").path | ||
| }); | ||
| ``` | ||
| ##License | ||
| See [license](https://github.com/pofider/phantom-workers/blob/master/LICENSE) |
24059
3.54%499
1.84%76
16.92%