html-snapshots 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/examples/html5rocks/package-lock.json +455 -57
- package/examples/html5rocks/package.json +1 -1
- package/examples/simple-promise/package-lock.json +89 -64
- package/examples/simple-promise/package.json +1 -1
- package/examples/sitemap-index/package-lock.json +43 -43
- package/examples/sitemap-index/package.json +1 -1
- package/lib/html-snapshots.js +4 -2
- package/lib/input-generators/_base.js +33 -3
- package/lib/puppeteer/index.js +11 -6
- package/package.json +4 -4
- package/test/mocha/browsers/puppeteer.js +24 -1
- package/test/mocha/input-generators/test.js +90 -0
package/README.md
CHANGED
|
@@ -235,6 +235,7 @@ An older (version 0.13.2), more in depth usage example is located in this [artic
|
|
|
235
235
|
+ `process.argv[6]` The path to a custom NodeJS module that returns a filter function.
|
|
236
236
|
+ `process.argv[7]` A debug flag to kick the browser into headed, devtools mode.
|
|
237
237
|
+ `process.argv[8]` A slowMo time \(milliseconds\) to slow the browser down.
|
|
238
|
+
+ `process.argv[9]` Stringified Puppeteer launch options.
|
|
238
239
|
|
|
239
240
|
`"object"` If an object is supplied, it has the following properties:
|
|
240
241
|
+ `script` This must be one of the following values:
|
|
@@ -323,6 +324,17 @@ An older (version 0.13.2), more in depth usage example is located in this [artic
|
|
|
323
324
|
+ default: 250 (milliseconds)
|
|
324
325
|
+ Specifies the rate at which the PhantomJS script checks to see if the selector is visible yet. Applies to all pages.
|
|
325
326
|
|
|
327
|
+
* **puppeteerLaunchOptions** {Object|Function}
|
|
328
|
+
> This options is only used with the puppeteer browser script
|
|
329
|
+
+ default: {}
|
|
330
|
+
+ Specifies launch options to give to Puppeteer. Can specify per page or for all pages. Puppeteer function options (like targetFilter) are not supported. Launch options will override any puppeteer debug options supplied.
|
|
331
|
+
|
|
332
|
+
The value can be one of these *javascript types*:
|
|
333
|
+
|
|
334
|
+
`"object"` If the value is an object, it can contain any puppeteer launch options, and is applied for all pages. The object will be given directly to `puppeteer.launch`.
|
|
335
|
+
|
|
336
|
+
"`function`" If the value is a function, it is called for every page and passed a single argument that is the url found in the input. The function must return puppeteer launch options to use for the page it is given. The value returned for a given page must be an object to be given directly to `puppeter.launch`.
|
|
337
|
+
|
|
326
338
|
* **phantomjsOptions** {String|Array|Object|Function}
|
|
327
339
|
> This option is only used with the phantomjs browser script
|
|
328
340
|
+ default: ""
|