html-snapshots 1.3.2 → 1.5.0

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.
Files changed (253) hide show
  1. package/lib/common/index.js +57 -3
  2. package/lib/common/sitemap/sitemap-collection.js +3 -2
  3. package/lib/common/sitemap/sitemap-index.js +1 -4
  4. package/lib/common/sitemap/sitemap.js +15 -13
  5. package/lib/html-snapshots.js +5 -6
  6. package/lib/input-generators/_base.js +5 -5
  7. package/package.json +5 -6
  8. package/.c8rc.json +0 -5
  9. package/.eslintignore +0 -5
  10. package/.eslintrc.json +0 -16
  11. package/.github/issue_template.md +0 -16
  12. package/.github/workflows/verify.yml +0 -32
  13. package/docs/example-heroku-redis.md +0 -43
  14. package/docs/notes.md +0 -42
  15. package/examples/README.md +0 -149
  16. package/examples/custom/README.md +0 -22
  17. package/examples/custom/myFilter.js +0 -22
  18. package/examples/custom/package-lock.json +0 -2804
  19. package/examples/custom/package.json +0 -12
  20. package/examples/custom/snapshot.js +0 -28
  21. package/examples/debug-phantomjs/README.md +0 -38
  22. package/examples/debug-phantomjs/package-lock.json +0 -2922
  23. package/examples/debug-phantomjs/package.json +0 -12
  24. package/examples/debug-phantomjs/snapshot.js +0 -60
  25. package/examples/debug-puppeteer/README.md +0 -18
  26. package/examples/debug-puppeteer/package-lock.json +0 -2804
  27. package/examples/debug-puppeteer/package.json +0 -12
  28. package/examples/debug-puppeteer/snapshot.js +0 -30
  29. package/examples/html5rocks/README.md +0 -22
  30. package/examples/html5rocks/package-lock.json +0 -3218
  31. package/examples/html5rocks/package.json +0 -12
  32. package/examples/html5rocks/snapshot.js +0 -59
  33. package/examples/process-limit/README.md +0 -24
  34. package/examples/process-limit/package-lock.json +0 -2830
  35. package/examples/process-limit/package.json +0 -12
  36. package/examples/process-limit/snapshot.js +0 -30
  37. package/examples/simple-promise/README.md +0 -20
  38. package/examples/simple-promise/package-lock.json +0 -2830
  39. package/examples/simple-promise/package.json +0 -12
  40. package/examples/simple-promise/snapshot.js +0 -30
  41. package/examples/sitemap-index/README.md +0 -20
  42. package/examples/sitemap-index/package-lock.json +0 -2830
  43. package/examples/sitemap-index/package.json +0 -12
  44. package/examples/sitemap-index/snapshot.js +0 -34
  45. package/examples/verbose/README.md +0 -22
  46. package/examples/verbose/package-lock.json +0 -2805
  47. package/examples/verbose/package.json +0 -12
  48. package/examples/verbose/snapshot.js +0 -34
  49. package/test/helpers/options.js +0 -55
  50. package/test/helpers/result.js +0 -32
  51. package/test/helpers/sitemap.js +0 -130
  52. package/test/mocha/async/test.js +0 -416
  53. package/test/mocha/browsers/puppeteer.js +0 -129
  54. package/test/mocha/browsers/server/index.html +0 -9
  55. package/test/mocha/browsers/test.js +0 -11
  56. package/test/mocha/common/helpers.js +0 -87
  57. package/test/mocha/common/test.js +0 -188
  58. package/test/mocha/html-snapshots/basics.js +0 -88
  59. package/test/mocha/html-snapshots/myFilter.js +0 -10
  60. package/test/mocha/html-snapshots/phantomjs-options.js +0 -156
  61. package/test/mocha/html-snapshots/process-limit.js +0 -156
  62. package/test/mocha/html-snapshots/puppeteer.js +0 -47
  63. package/test/mocha/html-snapshots/robots.js +0 -194
  64. package/test/mocha/html-snapshots/server/contact/index.html +0 -57
  65. package/test/mocha/html-snapshots/server/favicon.ico +0 -0
  66. package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.eot +0 -0
  67. package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.svg +0 -220
  68. package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.ttf +0 -0
  69. package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.woff +0 -0
  70. package/test/mocha/html-snapshots/server/images/ajax-loader.gif +0 -0
  71. package/test/mocha/html-snapshots/server/images/art1.jpg +0 -0
  72. package/test/mocha/html-snapshots/server/images/carpet.jpg +0 -0
  73. package/test/mocha/html-snapshots/server/images/carpets/carpet1.jpg +0 -0
  74. package/test/mocha/html-snapshots/server/images/carpets/carpet1_th.jpg +0 -0
  75. package/test/mocha/html-snapshots/server/images/carpets/carpet2.jpg +0 -0
  76. package/test/mocha/html-snapshots/server/images/carpets/carpet2_th.jpg +0 -0
  77. package/test/mocha/html-snapshots/server/images/carpets/carpet3.jpg +0 -0
  78. package/test/mocha/html-snapshots/server/images/carpets/carpet3_th.jpg +0 -0
  79. package/test/mocha/html-snapshots/server/images/carpets/carpet4.jpg +0 -0
  80. package/test/mocha/html-snapshots/server/images/carpets/carpet4_th.jpg +0 -0
  81. package/test/mocha/html-snapshots/server/images/floor.jpg +0 -0
  82. package/test/mocha/html-snapshots/server/images/foundation/orbit/bullets.jpg +0 -0
  83. package/test/mocha/html-snapshots/server/images/foundation/orbit/left-arrow-small.png +0 -0
  84. package/test/mocha/html-snapshots/server/images/foundation/orbit/left-arrow.png +0 -0
  85. package/test/mocha/html-snapshots/server/images/foundation/orbit/loading.gif +0 -0
  86. package/test/mocha/html-snapshots/server/images/foundation/orbit/mask-black.png +0 -0
  87. package/test/mocha/html-snapshots/server/images/foundation/orbit/pause-black.png +0 -0
  88. package/test/mocha/html-snapshots/server/images/foundation/orbit/right-arrow-small.png +0 -0
  89. package/test/mocha/html-snapshots/server/images/foundation/orbit/right-arrow.png +0 -0
  90. package/test/mocha/html-snapshots/server/images/foundation/orbit/rotator-black.png +0 -0
  91. package/test/mocha/html-snapshots/server/images/foundation/orbit/timer-black.png +0 -0
  92. package/test/mocha/html-snapshots/server/images/home-sprite/certification.png +0 -0
  93. package/test/mocha/html-snapshots/server/images/home-sprite/cleantrust.png +0 -0
  94. package/test/mocha/html-snapshots/server/images/home-sprite/institute.png +0 -0
  95. package/test/mocha/html-snapshots/server/images/home-sprite-s1a48fdbd81.png +0 -0
  96. package/test/mocha/html-snapshots/server/images/logo-300.png +0 -0
  97. package/test/mocha/html-snapshots/server/images/slider1-lg.jpg +0 -0
  98. package/test/mocha/html-snapshots/server/images/slider1.jpg +0 -0
  99. package/test/mocha/html-snapshots/server/index.css +0 -1
  100. package/test/mocha/html-snapshots/server/index.html +0 -57
  101. package/test/mocha/html-snapshots/server/nojq/index.html +0 -46
  102. package/test/mocha/html-snapshots/server/pjsopts/index.html +0 -55
  103. package/test/mocha/html-snapshots/server/public/page-sitemap.xml +0 -16
  104. package/test/mocha/html-snapshots/server/public/wordpress/category-sitemap.xml +0 -13
  105. package/test/mocha/html-snapshots/server/public/wordpress/page-sitemap.xml +0 -16
  106. package/test/mocha/html-snapshots/server/public/wordpress/post-sitemap.xml +0 -27
  107. package/test/mocha/html-snapshots/server/public/wordpress/post_tag-sitemap.xml +0 -17
  108. package/test/mocha/html-snapshots/server/public/wordpress/product-sitemap.xml +0 -13
  109. package/test/mocha/html-snapshots/server/public/wordpress-2/category-sitemap.xml +0 -13
  110. package/test/mocha/html-snapshots/server/public/wordpress-2/page-sitemap.xml +0 -16
  111. package/test/mocha/html-snapshots/server/public/wordpress-2/post-sitemap.xml +0 -27
  112. package/test/mocha/html-snapshots/server/public/wordpress-2/post_tag-sitemap.xml +0 -17
  113. package/test/mocha/html-snapshots/server/public/wordpress-2/product-sitemap.xml +0 -13
  114. package/test/mocha/html-snapshots/server/require.js +0 -1
  115. package/test/mocha/html-snapshots/server/services/carpets/index.html +0 -57
  116. package/test/mocha/html-snapshots/server/test_robots.txt +0 -13
  117. package/test/mocha/html-snapshots/server/test_robots_sitemap.txt +0 -15
  118. package/test/mocha/html-snapshots/server/test_robots_sitemap.xml +0 -22
  119. package/test/mocha/html-snapshots/server/test_sitemap_index-2.xml +0 -25
  120. package/test/mocha/html-snapshots/server/test_sitemap_index-3.xml +0 -25
  121. package/test/mocha/html-snapshots/server/test_sitemap_index.xml +0 -25
  122. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/extras/custom-validity.js +0 -1
  123. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/extras/modernizr-custom.js +0 -1
  124. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/extras/mousepress.js +0 -1
  125. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/polyfiller.js +0 -1
  126. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/canvas2png.js +0 -1
  127. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/flashcanvas.js +0 -1
  128. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/flashcanvas.swf +0 -0
  129. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/proxy.php +0 -73
  130. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/save.php +0 -49
  131. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/canvas2png.js +0 -1
  132. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/flash10canvas.swf +0 -0
  133. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/flash9canvas.swf +0 -0
  134. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/flashcanvas.js +0 -1
  135. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/proxy.php +0 -73
  136. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/save.php +0 -49
  137. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/1.js +0 -1
  138. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/10.js +0 -1
  139. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/11.js +0 -1
  140. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/12.js +0 -1
  141. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/13.js +0 -1
  142. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/14.js +0 -1
  143. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/15.js +0 -1
  144. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/16.js +0 -1
  145. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/17.js +0 -1
  146. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/18.js +0 -1
  147. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/19.js +0 -1
  148. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/2.js +0 -1
  149. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/20.js +0 -1
  150. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/21.js +0 -1
  151. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/22.js +0 -1
  152. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/23.js +0 -1
  153. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/24.js +0 -1
  154. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/25.js +0 -1
  155. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/26.js +0 -1
  156. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/27.js +0 -1
  157. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/3.js +0 -1
  158. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/4.js +0 -1
  159. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/5.js +0 -1
  160. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/59.js +0 -1
  161. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/6.js +0 -1
  162. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/7.js +0 -1
  163. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/8.js +0 -1
  164. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/9.js +0 -1
  165. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/details.js +0 -1
  166. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/dom-extend.js +0 -1
  167. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/es5.js +0 -1
  168. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/excanvas.js +0 -1
  169. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-core.js +0 -1
  170. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-datalist.js +0 -1
  171. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-message.js +0 -1
  172. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-native-extend.js +0 -1
  173. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-number-date-api.js +0 -1
  174. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-number-date-ui.js +0 -1
  175. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-shim-extend.js +0 -1
  176. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/geolocation.js +0 -1
  177. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ar.js +0 -1
  178. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ch-ZN.js +0 -1
  179. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-de.txt +0 -33
  180. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-el.js +0 -1
  181. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-en.txt +0 -34
  182. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-es.js +0 -1
  183. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-fr.js +0 -1
  184. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-he.js +0 -1
  185. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-hi.js +0 -1
  186. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-hu.js +0 -1
  187. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-it.js +0 -1
  188. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ja.js +0 -1
  189. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-nl.js +0 -1
  190. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-pt-PT.js +0 -1
  191. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ru.js +0 -1
  192. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-sv.js +0 -1
  193. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/json-storage.js +0 -1
  194. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/jwplayer/license.txt +0 -1
  195. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/jwplayer/player.swf +0 -0
  196. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/jwplayer/readme.html +0 -87
  197. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-core.js +0 -1
  198. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-jaris.js +0 -1
  199. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-native-fix.js +0 -1
  200. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-swf.js +0 -1
  201. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-yt.js +0 -1
  202. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/details-arrows.png +0 -0
  203. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/forms.png +0 -0
  204. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/polyfill-loader.gif +0 -0
  205. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/shim.css +0 -1
  206. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/swf/JarisFLVPlayer.swf +0 -0
  207. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/swf/jwwebshims.swf +0 -0
  208. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/swf/localStorage.swf +0 -0
  209. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/track-ui.js +0 -1
  210. package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/track.js +0 -1
  211. package/test/mocha/html-snapshots/server/vendor/js/plugins/cload.js +0 -49
  212. package/test/mocha/html-snapshots/server/vendor/js/plugins/modernizr.js +0 -4
  213. package/test/mocha/html-snapshots/server/vendor/js/plugins/oldie.js +0 -74
  214. package/test/mocha/html-snapshots/sitemap-index.js +0 -140
  215. package/test/mocha/html-snapshots/sitemap.js +0 -104
  216. package/test/mocha/html-snapshots/snapshot-scripts.js +0 -206
  217. package/test/mocha/html-snapshots/test.js +0 -105
  218. package/test/mocha/html-snapshots/test_robots.txt +0 -13
  219. package/test/mocha/html-snapshots/test_sitemap.xml +0 -22
  220. package/test/mocha/html-snapshots/use-jquery.js +0 -144
  221. package/test/mocha/html-snapshots/utils.js +0 -200
  222. package/test/mocha/input-generators/server/public/wordpress/category-sitemap.xml +0 -13
  223. package/test/mocha/input-generators/server/public/wordpress/page-sitemap.xml +0 -16
  224. package/test/mocha/input-generators/server/public/wordpress/post-sitemap.xml +0 -55
  225. package/test/mocha/input-generators/server/public/wordpress/post_tag-sitemap.xml +0 -25
  226. package/test/mocha/input-generators/server/public/wordpress/product-sitemap.xml +0 -13
  227. package/test/mocha/input-generators/server/test_robots.txt +0 -15
  228. package/test/mocha/input-generators/server/test_robots_bad.txt +0 -11
  229. package/test/mocha/input-generators/server/test_robots_sitemap.txt +0 -17
  230. package/test/mocha/input-generators/server/test_robots_sitemap_bad.txt +0 -17
  231. package/test/mocha/input-generators/server/test_robots_sitemap_multi.txt +0 -18
  232. package/test/mocha/input-generators/server/test_sitemap.xml +0 -34
  233. package/test/mocha/input-generators/server/test_sitemap.xml.gz +0 -0
  234. package/test/mocha/input-generators/server/test_sitemap_bad.xml.gz +0 -0
  235. package/test/mocha/input-generators/server/test_sitemap_index.xml +0 -25
  236. package/test/mocha/input-generators/server/test_sitemap_index.xml.gz +0 -0
  237. package/test/mocha/input-generators/server/test_sitemap_index_empty.xml +0 -3
  238. package/test/mocha/input-generators/server/test_sitemap_index_malformed.xml +0 -2
  239. package/test/mocha/input-generators/sitemap-index.js +0 -87
  240. package/test/mocha/input-generators/sitemap.js +0 -320
  241. package/test/mocha/input-generators/test.js +0 -1447
  242. package/test/mocha/input-generators/test_line.txt +0 -5
  243. package/test/mocha/input-generators/test_robots.txt +0 -15
  244. package/test/mocha/input-generators/test_robots_bad.txt +0 -11
  245. package/test/mocha/input-generators/test_robots_sitemap.txt +0 -17
  246. package/test/mocha/input-generators/test_robots_sitemap_bad.txt +0 -17
  247. package/test/mocha/input-generators/test_robots_sitemap_multi.txt +0 -18
  248. package/test/mocha/input-generators/test_sitemap.xml +0 -34
  249. package/test/mocha/input-generators/test_sitemap.xml.gz +0 -0
  250. package/test/mocha/input-generators/test_sitemap_bad.xml.gz +0 -0
  251. package/test/mocha/input-generators/test_sitemap_index.xml +0 -25
  252. package/test/mocha/input-generators/test_sitemap_index.xml.gz +0 -0
  253. package/test/server/index.js +0 -32
@@ -1,12 +0,0 @@
1
- {
2
- "name": "html-snapshots-example",
3
- "version": "0.1.0",
4
- "author": "Alex Grant <alex@localnerve.com>",
5
- "description": "An example using html-snapshots",
6
- "scripts": {
7
- "start": "node ./snapshot.js"
8
- },
9
- "dependencies": {
10
- "html-snapshots": "^1.2.0"
11
- }
12
- }
@@ -1,34 +0,0 @@
1
- /*
2
- * Simple page snapshots example.
3
- * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
4
- *
5
- * Use sitemap index to drive input to snapshot individual pages.
6
- */
7
- const htmlSnapshots = require('html-snapshots');
8
- const utils = require("../utils");
9
-
10
- // where the snapshots go
11
- const outputDir = require('path').join(__dirname, './tmp');
12
-
13
- // If you want to crawl a huge map:
14
- // 'https://www.usgs.gov/sitemap.xml',
15
-
16
- // Do it:
17
- htmlSnapshots.run({
18
- input: 'sitemap-index',
19
- source: 'http://bestplacestowork.org/sitemap_index.xml',
20
- outputDir,
21
- outputDirClean: true,
22
- selector: 'body',
23
- timeout: 60000
24
- })
25
- .then(completed => {
26
- console.log('completed #', completed.length);
27
- console.log('completed snapshots:');
28
- console.log(require('util').inspect(completed));
29
- })
30
- .catch(err => {
31
- console.error('completed #', err.completed.length);
32
- console.error('not completed #', err.notCompleted.length)
33
- console.error(err);
34
- });
@@ -1,22 +0,0 @@
1
- # Example
2
-
3
- > Snapshot a sample website with sitemap, using the verbose option to debug.
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 snapshots the entire website of the WPSPA example application using its sitemap to drive. For one of the pages, produce verbose output to debug what is going on.
16
-
17
- ## Notes on Interpreting Results
18
- This example creates a local `tmp` directory where the snapshot output is stored.
19
- Inspect the output directory structure and contents.
20
- Compare snapshots with the original website to see what happened.
21
- ### Verbose output
22
- This example uses the `verbose` option to produce extended output to debug snapshotting. To see this output, you must look at the console output for the page `sample-page`.