#!/bin/sh # Runs axe on every page of my sitemap # first arg is output directory, after that comes urls from a sitemap. We replace the urls with equivalent local file paths. PATH="$(dirname "$0"):$PATH" output_dir="$1" shift urls="$(echo "$*" | tr ' ' '\n' | sd '^https?://[^/]*' "file://$PWD/$output_dir" | sd '/$' '/index.html' | tr '\n' ' ')" pnpm --package @axe-core/cli -s dlx axe $urls -b firefox --show-errors