Skip to content

Commit

Permalink
feat: working with DOMInformations, custom gatherer
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Apr 27, 2024
1 parent 3918a3c commit 6fd9943
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 109 deletions.
6 changes: 2 additions & 4 deletions examples/lighthouse-cli-linked-lib/custom-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import DOMInformations from 'lighthouse-plugin-ecoindex/gatherers/dom-informations.js';
/** @type {LH.Config} */
const config = {
formFactor: 'desktop',
Expand All @@ -28,10 +29,7 @@ const config = {
preset: 'desktop',
extends: "lighthouse:default",
artifacts: [
{
id: 'DOMInformations',
gatherer: 'lighthouse-plugin-ecoindex/gatherers/dom-informations',
},
{id: 'DOMInformations', gatherer: DOMInformations},
],
}

Expand Down
3 changes: 2 additions & 1 deletion examples/lighthouse-cli-linked-lib/init.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
npm link lighthouse-plugin-ecoindex
npm link lighthouse-plugin-ecoindex
cd /workspace/lighthouse-plugin-ecoindex && npm link
10 changes: 4 additions & 6 deletions examples/lighthouse-cli-linked-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
"scripts": {
"lighthouse": "lighthouse",
"cli": "npm run cli:collect",
"cli:collect": "CHROME_PATH=$(which chromium) lighthouse --config-path=\"./custom-config.js\" --chrome-flags=\"--headless\" --output json --output html --output-path=./reports/report.json https://www.spie.com/en/about-us/spie-around-world",
"cli:collect:debug": "CHROME_PATH=$(which chromium) lighthouse --verbose --config-path=\"./custom-config.js\" --chrome-flags=\"--headless\" --output json --output html --output-path=./reports/report.json https://www.spie.com/en/about-us/spie-around-world 2>&1| tee debug.log",
"cli:collect": "lighthouse --config-path=\"./custom-config.js\" --chrome-flags=\"--headless\" --output json --output html --output-path=./reports/report.json https://www.spie.com/en/about-us/spie-around-world",
"cli:collect:debug": "lighthouse --verbose --config-path=\"./custom-config.js\" --chrome-flags=\"--headless\" --output json --output html --output-path=./reports/report.json https://www.spie.com/en/about-us/spie-around-world 2>&1| tee debug.log",
"serve": "npx http-server -o reports --no-dotfiles",
"clean": "rm -rf reports/* && touch reports/.gitkeep",
"patch-package": "patch-package"
"clean": "rm -rf reports/* && touch reports/.gitkeep"
},
"author": "",
"license": "ISC",
"dependencies": {
"lighthouse": "^11.7.0",
"patch-package": "^8.0.0"
"lighthouse": "^11.7.0"
}
}
98 changes: 0 additions & 98 deletions examples/lighthouse-cli-linked-lib/patches/lighthouse+11.7.0.patch

This file was deleted.

0 comments on commit 6fd9943

Please sign in to comment.