mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
7a3aee1539
- Add lint using local installation of the Nu HTML Validator and some jq-based filtering of false positives - Move linter configs to directory, to de-clutter the repo
26 lines
1.4 KiB
Makefile
26 lines
1.4 KiB
Makefile
# 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/Downloads/chromium/thorium/latest/chrome
|
|
CHROME_PROFILE ?= /tmp/chrome-lighthouse
|
|
JS_FLAGS=''
|
|
CHROME_FLAGS += --disable-extensions --no-default-browser-check --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-device-discovery-notifications --disable-domain-reliability --disable-background-timer-throttling --disable-breakpad --enable-blink-features=LayoutInstabilityAPI --no-first-run --disable-component-update --disable-background-networking --user-data-dir=$(CHROME_PROFILE) --enable-quic --origin-to-force-quic-on=$(DOMAIN):443
|
|
CPU_SLOWDOWN=2.8
|
|
LIGHTHOUSE_ARGS += --budget-path linter-configs/budget.json --output html --output json --output-file lighthouse-results --throttling.cpuSlowdownMultiplier=$(CPU_SLOWDOWN) --chrome-flags="$(CHROME_FLAGS)"
|
|
|
|
hint-online:
|
|
hint --config linter-configs/hintrc -f codeframe $(URL)
|
|
lighthouse:
|
|
mkdir -p $(CHROME_PROFILE)
|
|
CHROME_PATH=$(CHROME_PATH) CHROME_PROFILE=$(CHROME_PROFILE) JS_FLAGS='' lighthouse $(URL) $(LIGHTHOUSE_ARGS)
|
|
rm -rf $(CHROME_PROFILE)
|
|
redbot:
|
|
redbot_cli -a $(URL)
|
|
|
|
all: lighthouse hint-online
|
|
|
|
.PHONY: hint-online lighthouse redbot all
|