From 99264641f3e93650b9ff8e5abc38ba3e62d22eb0 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Mon, 13 Jun 2022 17:06:48 -0700 Subject: [PATCH] Add axe-core linting to supplementary Makefile --- Makefile.online | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile.online b/Makefile.online index 74444e3..057012e 100644 --- a/Makefile.online +++ b/Makefile.online @@ -3,12 +3,15 @@ DOMAIN = seirdy.one PAGE_PATH = / SCHEME=https:// -URL = $(SCHEME)$(DOMAIN)$(PAGE_PATH) +URL ?= $(SCHEME)$(DOMAIN)$(PAGE_PATH) # latest bleeding-edge chromium snapshot -CHROME_PATH = /home/rkumar/Downloads/chromium/thorium/latest/chrome +CHROME_DIR = /home/rkumar/Downloads/gitclone/chromium/thorium/latest +CHROME_PATH = $(CHROME_DIR)/chrome +CHROMEDRIVER_PATH = $(CHROME_DIR)/chromedriver 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 +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-background-networking --user-data-dir=$(CHROME_PROFILE) --enable-quic --origin-to-force-quic-on=$(DOMAIN):443 +CHROME_FLAGS_COMMA = '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,no-first-run,disable-background-networking,js-flags=--jitless' 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)" @@ -20,6 +23,8 @@ lighthouse: rm -rf $(CHROME_PROFILE) redbot: redbot_cli -a $(URL) +axe: + axe $(URLS) --chrome-options $(CHROME_FLAGS_COMMA) --chromedriver-path=$(CHROMEDRIVER_PATH) --show-errors all: lighthouse hint-online