2022-08-10 21:30:22 -07:00
|
|
|
#!/bin/sh
|
2023-11-23 19:06:46 -08:00
|
|
|
|
|
|
|
set -e -u
|
2022-08-10 21:30:22 -07:00
|
|
|
# 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.
|
2023-11-23 18:45:03 -08:00
|
|
|
PATH="$(dirname "$0"):$PATH"
|
2022-08-10 21:30:22 -07:00
|
|
|
output_dir="$1"
|
|
|
|
shift
|
|
|
|
urls="$(echo "$*" | tr ' ' '\n' | sd '^https?://[^/]*' "file://$PWD/$output_dir" | sd '/$' '/index.html' | tr '\n' ' ')"
|
2023-11-10 10:43:09 -08:00
|
|
|
pnpm --package @axe-core/cli -s dlx axe $urls -b firefox --show-errors
|