Last active
May 22, 2017 21:56
-
-
Save andreasvirkus/bf35b5dd2e34a2b3bf3f3b2380f1876a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# Loop through all script files and minify them individually | |
# to leverage that sweet HTTP/2 performance | |
# | |
# Alternative is to minify them into one file: | |
# uglifyjs ./dist/assets/js/*.js -c -m -o ./dist/assets/js/script.min.js | |
FILES=./dist/assets/js/* | |
for f in $FILES | |
do | |
node_modules/.bin/uglifyjs $f -c -m --overwrite -o ./dist/assets/js/$(basename $f .js).min.js | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment