Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash
OLDIFS=$IFS
IFS=$'\n'
for FILE in $(find public -type f -iname '*.css' -o -iname '*.js' -o -iname '*.svg' -o -iname '*.json'); do
echo -n "Compressing ${FILE}..."
brotli --input ${FILE} --force --output ${FILE}.br;
echo "done."
done
IFS=$OLDIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment