Skip to content

Commit 1b57645

Browse files
committed
* update script to zsh
1 parent b192a17 commit 1b57645

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

script/axe-docs

100644100755
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/env bash
1+
#!/bin/zsh
22

3-
yarn global add @axe-core/cli
3+
npm install -g @axe-core/cli
44

55
# https://stackoverflow.com/a/21189044
66
parse_yaml() {
@@ -43,18 +43,17 @@ printf '%s\n' "${needs_to_be_fixed[@]}"
4343
echo "############################################################"
4444

4545
# Generate doc urls
46-
declare -a doc_urls
47-
46+
doc_urls=()
4847
for i in "${nav_paths[@]}";
4948
do
5049
if [[ " ${needs_to_be_fixed[*]} " =~ " ${i} " ]]; then
5150
continue
5251
else
53-
doc_url="localhost:8000$i"
54-
doc_url=("${doc_url//\"/}")
55-
doc_urls+=$doc_url
56-
fi
52+
doc_url="primer.style/css$i"
53+
doc_url="${doc_url//\"/}"
54+
doc_urls+=($doc_url)
55+
fi
5756
done
5857

59-
# axe $doc_urls --save docs-example-accessibility.json --include "iframe" --disable html-has-lang,frame-title,page-has-heading-one,region,color-contrast,landmark-unique,landmark-one-main --exit --show-errors
60-
axe $doc_urls --include "iframe" --disable html-has-lang,frame-title,page-has-heading-one,region,color-contrast,landmark-unique,landmark-one-main
58+
axe $doc_urls --include "iframe" --disable html-has-lang,frame-title,page-has-heading-one,region,color-contrast,landmark-unique,landmark-one-main --exit --show-errors
59+
# axe $doc_urls --include "iframe" --disable html-has-lang,frame-title,page-has-heading-one,region,color-contrast,landmark-unique,landmark-one-main

0 commit comments

Comments
 (0)