Skip to content

Instantly share code, notes, and snippets.

@knjname
Created November 13, 2019 09:55
Show Gist options
  • Save knjname/2047d93253185bccde45b104a79a86ee to your computer and use it in GitHub Desktop.
Save knjname/2047d93253185bccde45b104a79a86ee to your computer and use it in GitHub Desktop.
generate-google-material-icon-names-for-ts.sh
dest=src/components/atoms/icon/IconTypes.ts
cat > $dest <<EOF
export type IconTypes =
EOF
curl 'https://fonts.google.com/metadata/icons' \
| tail -n +2 \
| jq '.icons[].name' \
| perl -e 'print " | " . join " | ", <>' \
>> $dest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment