This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to run lighthouse reports in bulk (#97)
* Add script to run lighthouse reports in bulk * Add node-version and set drone ci to use the same version * Get all the images switched and sign file
- Loading branch information
Showing
6 changed files
with
397 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,3 +96,5 @@ yarn-error.log | |
.yarn-integrity | ||
|
||
secrets.yml | ||
|
||
report/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
SITEMAP_URL="https://coreyja.com/sitemap.xml" | ||
|
||
# $1 - xml url | ||
parse_xml() { | ||
urls=`curl -s $1 | sed -n 's/^.*<loc>\(.*\)<\/loc>.*$/\1/p'` | ||
xmls=(`grep -e ".xml$" <<< $urls`) | ||
for xml_url in "${xmls[@]}" | ||
do | ||
parse_xml $xml_url | ||
done | ||
pages=(`grep -v -e ".xml$" <<< $urls`) | ||
printf '%s\n' "${pages[@]}" >&1 | ||
} | ||
urls=$(parse_xml $SITEMAP_URL | paste -sd "," -) | ||
yarn run lighthouse-batch -s "$urls" |
Oops, something went wrong.