Skip to content

Commit 95eb4d9

Browse files
Only generate if a key is passed.
1 parent d1e49ef commit 95eb4d9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

bin/generate-google-font-list.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ source "$(dirname "$0")/wp-bin/wp-bin.sh"
55

66
read -s -p "Enter your Google Fonts API key: " key
77

8-
DATA=$(download "https://www.googleapis.com/webfonts/v1/webfonts?key=$key")
9-
10-
echo ${DATA} | jq '.items | map({family, category, variants, subsets})' > "./resources/data/google-fonts.json"
8+
if [ "$key" ]
9+
then
10+
DATA=$(download "https://www.googleapis.com/webfonts/v1/webfonts?key=$key")
11+
echo ${DATA} | jq '.items | map({family, category, variants, subsets})' > "./resources/data/google-fonts.json"
12+
fi

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)