html-snapshots 0.19.0 → 1.0.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/.github/workflows/verify.yml +2 -2
- package/HISTORY.md +42 -0
- package/README.md +92 -244
- package/examples/README.md +149 -0
- package/examples/custom/package-lock.json +1090 -9
- package/examples/custom/package.json +1 -1
- package/examples/debug-phantomjs/package-lock.json +1977 -292
- package/examples/debug-phantomjs/package.json +1 -1
- package/examples/debug-phantomjs/snapshot.js +1 -0
- package/examples/debug-puppeteer/README.md +18 -0
- package/examples/debug-puppeteer/package-lock.json +2804 -0
- package/examples/debug-puppeteer/package.json +12 -0
- package/examples/debug-puppeteer/snapshot.js +30 -0
- package/examples/html5rocks/package-lock.json +734 -18
- package/examples/html5rocks/package.json +1 -1
- package/examples/html5rocks/snapshot.js +0 -6
- package/examples/process-limit/package-lock.json +734 -18
- package/examples/process-limit/package.json +1 -1
- package/examples/simple-promise/package-lock.json +734 -18
- package/examples/simple-promise/package.json +1 -1
- package/examples/sitemap-index/package-lock.json +734 -18
- package/examples/sitemap-index/package.json +1 -1
- package/examples/sitemap-index/snapshot.js +0 -1
- package/examples/verbose/package-lock.json +734 -19
- package/examples/verbose/package.json +1 -1
- package/examples/verbose/snapshot.js +1 -0
- package/lib/html-snapshots.js +87 -4
- package/lib/input-generators/_base.js +7 -1
- package/lib/puppeteer/index.js +98 -0
- package/lib/puppeteer/removeScripts.js +8 -0
- package/package.json +6 -2
- package/test/mocha/browsers/puppeteer.js +106 -0
- package/test/mocha/browsers/server/index.html +9 -0
- package/test/mocha/browsers/test.js +11 -0
- package/test/mocha/html-snapshots/basics.js +60 -47
- package/test/mocha/html-snapshots/phantomjs-options.js +54 -60
- package/test/mocha/html-snapshots/process-limit.js +100 -92
- package/test/mocha/html-snapshots/puppeteer.js +47 -0
- package/test/mocha/html-snapshots/robots.js +137 -120
- package/test/mocha/html-snapshots/server/public/page-sitemap.xml +16 -0
- package/test/mocha/html-snapshots/sitemap-index.js +89 -80
- package/test/mocha/html-snapshots/sitemap.js +75 -31
- package/test/mocha/html-snapshots/snapshot-scripts.js +124 -120
- package/test/mocha/html-snapshots/test.js +11 -2
- package/test/mocha/html-snapshots/use-jquery.js +65 -64
- package/test/mocha/html-snapshots/utils.js +29 -29
- package/examples/utils/index.js +0 -25
|
@@ -32,6 +32,7 @@ htmlSnapshots.run({
|
|
|
32
32
|
outputDirClean: true,
|
|
33
33
|
selector: "#mainContent",
|
|
34
34
|
timeout: 10000,
|
|
35
|
+
browser: "phantomjs",
|
|
35
36
|
phantomjsOptions: {
|
|
36
37
|
// The key must exactly match the loc as defined in the sitemap.xml
|
|
37
38
|
"https://www.sitemaps.org/protocol.html": "--remote-debugger-port=9000"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Example
|
|
2
|
+
|
|
3
|
+
> Run a single page in the puppeteer debugger to see what is going on for a problem snapshot.
|
|
4
|
+
|
|
5
|
+
> All examples assume you already have NodeJS installed on your local machine
|
|
6
|
+
|
|
7
|
+
## How To Run
|
|
8
|
+
1. Clone this repo
|
|
9
|
+
2. Open a command prompt
|
|
10
|
+
3. Change to the examples/custom directory
|
|
11
|
+
4. Run `npm install`
|
|
12
|
+
5. Run `npm start`
|
|
13
|
+
|
|
14
|
+
## What It Does
|
|
15
|
+
This example loads google.com into puppeteer, starts it in headed mode in slow motion with devtools.
|
|
16
|
+
|
|
17
|
+
## Notes on Interpreting Results
|
|
18
|
+
This example starts headed chrome so you can inspect the page manually using devtools.
|