puppetarazzi
Advanced tools
Comparing version 0.2.18 to 0.2.20
{ | ||
"name": "puppetarazzi", | ||
"version": "0.2.18", | ||
"version": "0.2.20", | ||
"description": "Takes screenshots of your website and annoys you by pointing out your flaws (mixed-content, uncompressed content, 404s, etc)\"", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -14,3 +14,13 @@ /** | ||
module.exports = function(puppetarazzi, config, testReporter) { | ||
let pageConfig = config; | ||
return { | ||
onLoading: async function(page, pageDefinition) { | ||
pageConfig = config; | ||
// overwrite with required list from page definition | ||
if (pageDefinition && pageDefinition.plugins && pageDefinition.plugins.meta) { | ||
pageConfig.required = pageDefinition.plugins.meta.required; | ||
} | ||
}, | ||
onLoaded: async function(page) { | ||
@@ -33,5 +43,5 @@ let metas = []; | ||
for (let i = 0; i < config.required.length; i++) { | ||
for (let i = 0; i < pageConfig.required.length; i++) { | ||
let found = false; | ||
let req = config.required[i]; | ||
let req = pageConfig.required[i]; | ||
let type = req["http-equiv"] ? "http-equiv" : "name"; | ||
@@ -38,0 +48,0 @@ |
@@ -24,2 +24,3 @@ // | ||
pageConfig = config; | ||
if (pageDefinition && pageDefinition.plugins && pageDefinition.plugins.schema) { | ||
@@ -26,0 +27,0 @@ pageConfig = _.merge({}, pageConfig, pageDefinition.plugins.schema); |
# Puppetarazzi | ||
v0.2.18 | ||
v0.2.20 | ||
@@ -187,3 +187,11 @@ Copyright 2018 Nic Jansma | ||
{ "name": "kindle-fire-hdx", "width": 800, "height": 1280 } | ||
] | ||
], | ||
// if launching from a Docker container | ||
"puppeteerOptions": { | ||
"args": [ | ||
"--no-sandbox", | ||
"--disable-setuid-sandbox" | ||
] | ||
} | ||
} | ||
@@ -206,5 +214,10 @@ ``` | ||
* `devices` - A list of `name`, `width` and `height` pairs | ||
* `puppeteerOptions` - Options to pass to `puppeteer.launch()` | ||
## Version History | ||
* v0.2.20 - 2020-05-03 | ||
* `meta`: Added page-specific overrides | ||
* v0.2.19 - 2018-11-24 | ||
* Added `puppeteerOptions` as a config JSON option for arguments to pass to `puppeteer.launch()` | ||
* v0.2.18 - 2018-07-10 | ||
@@ -211,0 +224,0 @@ * `no-redirects`, `img-alt`: Fixes for `exclude` if not specified |
@@ -48,3 +48,3 @@ // | ||
// launch the browser | ||
let browser = await puppeteer.launch(); | ||
let browser = await puppeteer.launch(this.config.puppeteerOptions); | ||
await this.notifyPlugins("onBrowser", browser); | ||
@@ -51,0 +51,0 @@ |
Sorry, the diff of this file is not supported yet
279
64278
28
1451