From 64496029ff792a76ecd3ea689ddb82cdcae05d5b Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Mon, 21 Dec 2020 16:46:27 -0800 Subject: [PATCH] Add new/updated files for testing Add new/updated config files for lighthouse, webhint, and lychee. Ignore artifacts produced by lighthouse in .gitignroe --- .gitignore | 2 ++ .hintrc | 5 +++- Makefile.online | 23 ++++++++++++++ budget.json | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ lychee.toml | 1 - 5 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 Makefile.online create mode 100644 budget.json diff --git a/.gitignore b/.gitignore index 95eaf4c..08ff4c5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ public/ public_*/ hint-report/ .hintrc-local +*.report.html +*.report.json diff --git a/.hintrc b/.hintrc index d4847c6..1f23e57 100644 --- a/.hintrc +++ b/.hintrc @@ -15,12 +15,15 @@ "doctype": "error", "performance-budget": "error", "compat-api/css": "error", + "manifest-is-valid": "error", + "manifest-file-extension": "error", "compat-api/html": [ "error", { "ignore": [ "time", - "picture" + "picture", + "meta[name=color-scheme]" ] } ], diff --git a/Makefile.online b/Makefile.online new file mode 100644 index 0000000..df89498 --- /dev/null +++ b/Makefile.online @@ -0,0 +1,23 @@ +# The following test the online instance, post-deploy. I just kept them here for convenience + +DOMAIN = seirdy.one +PAGE_PATH = / +SCHEME=https:// +URL = $(SCHEME)$(DOMAIN)$(PAGE_PATH) +# latest bleeding-edge chromium snapshot +CHROME_PATH = /home/rkumar/Executables/ghq/github.com/chromium-unofficial-latest-linux/chromium-latest-linux/latest/chrome +CHROME_PROFILE = /tmp/chrome-lighthouse +CHROME_FLAGS += --headless --disable-extensions --no-sandbox --no-first-run --user-data-dir=$(CHROME_PROFILE) +CPU_SLOWDOWN=2.4 +LIGHTHOUSE_ARGS += --budget-path budget.json --output html --output json --output-file lighthouse-results --throttling.cpuSlowdownMultiplier=$(CPU_SLOWDOWN) --chrome-flags=$(CHROME_FLAGS) + +hint-online: + hint --config .hintrc -f codeframe $(URL) +lighthouse: + mkdir -p $(CHROME_PROFILE) + lighthouse $(URL) $(LIGHTHOUSE_ARGS) + rm -rf $(CHROME_PROFILE) + +all: lighthouse hint-online + +.PHONY: hint-online lighthouse all diff --git a/budget.json b/budget.json new file mode 100644 index 0000000..1641c26 --- /dev/null +++ b/budget.json @@ -0,0 +1,79 @@ +[ + { + "options": { + "firstPartyHostnames": [ + "seirdy.one", + "localhost" + ] + }, + "timings": [ + { + "metric": "total-blocking-time", + "budget": 0 + }, + { + "metric": "cumulative-layout-shift", + "budget": 0 + } + ], + "resourceSizes": [ + { + "resourceType": "total", + "budget": 100 + }, + { + "resourceType": "document", + "budget": 30 + }, + { + "resourceType": "image", + "budget": 70 + }, + { + "resourceType": "stylesheet", + "budget": 5 + } + ], + "resourceCounts": [ + { + "resourceType": "script", + "budget": 0 + }, + { + "resourceType": "font", + "budget": 0 + }, + { + "resourceType": "third-party", + "budget": 0 + } + ] + }, + { + "path": "/index.html", + "timings": [ + { + "metric": "largest-contentful-paint", + "budget": 1000 + } + ], + "resourceSizes": [ + { + "resourceType": "total", + "budget": 10 + }, + { + "resourceType": "document", + "budget": 8 + }, + { + "resourceType": "image", + "budget": 5 + }, + { + "resourceType": "stylesheet", + "budget": 2 + } + ] + } +] diff --git a/lychee.toml b/lychee.toml index 88e64e6..763208b 100644 --- a/lychee.toml +++ b/lychee.toml @@ -2,6 +2,5 @@ insecure = true method = "get" exclude = [ "^gemini://.*", - "mailto:.*", "git@git.*", ]