Closed pdehaan closed 6 months ago
Straw person proposal:
diff --git a/package.json b/package.json
index 162bacd..bf92b62 100644
--- a/package.json
+++ b/package.json
@@ -28,15 +28,17 @@
"eslint-plugin-node": "^6.0.1",
"faucet": "^0.0.1",
"htmllint-cli": "^0.0.6",
+ "lighthouse": "2.9.4",
"npm-run-all": "^4.1.3",
"nsp": "^3.2.1",
"nyc": "^11.8.0",
"tape": "^4.9.0"
},
"engines": {
"node": ">=8"
},
- "homepage": "https://github.com/mozilla/blurts-server#readme",
+ "homepage": "https://fx-breach-alerts.herokuapp.com/",
"license": "ISC",
"main": "server.js",
"nyc": {
@@ -51,6 +53,9 @@
"lint": "npm-run-all lint:*",
"lint:js": "eslint .",
"lint:nsp": "nsp check",
+ "lighthouse:clean": "rm ./fx-breach-alerts.herokuapp.com_*",
+ "lighthouse:desktop": "npm run lighthouse:mobile -- --disable-device-emulation",
+ "lighthouse:mobile": "lighthouse $npm_package_homepage --quiet --view --chrome-flags='--headless' --throttling-method=provided --save-assets",
"migrate": "knex migrate:latest --knexfile db/knexfile.js",
"pretest": "npm run lint",
"get-hashsets": "node scripts/get-hashsets",
Basically we'd have 3 targets:
fx-breach-alerts.herokuapp.com_*
Closing since we have a new Jira ticket to track this.
https://developers.google.com/web/tools/lighthouse/
It's a good little deploy check, but not sure how much we want to integrate it.
I've been hacking around with the latest v3-alpha branch and this seems to work OK:
Here's the results w/ device (Nexus 5X) emulation:
And the results w/ device emulation disabled:
I haven't figured out how to disable specific "suites" (like "Progressive Web App") via the CLI yet. I think at a minimum, it may be interesting to try adding lighthouse to package.json scripts and this would just be some manual audit process we do while developing to try and squash a few a11y and SEO nits.