1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Add new/updated files for testing

Add new/updated config files for lighthouse, webhint, and lychee.
Ignore artifacts produced by lighthouse in .gitignroe
This commit is contained in:
Rohan Kumar 2020-12-21 16:46:27 -08:00
parent 3f2233d35e
commit 64496029ff
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 108 additions and 2 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@ public/
public_*/
hint-report/
.hintrc-local
*.report.html
*.report.json

View file

@ -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]"
]
}
],

23
Makefile.online Normal file
View file

@ -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

79
budget.json Normal file
View file

@ -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
}
]
}
]

View file

@ -2,6 +2,5 @@ insecure = true
method = "get"
exclude = [
"^gemini://.*",
"mailto:.*",
"git@git.*",
]