Skip to content

Instantly share code, notes, and snippets.

@SlexAxton
Created February 24, 2011 19:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SlexAxton/842733 to your computer and use it in GitHub Desktop.
Save SlexAxton/842733 to your computer and use it in GitHub Desktop.
yepnope.js compress script
#/bin/sh
node build/UglifyJS/bin/uglifyjs --extra --unsafe yepnope.js > yepnope.min.js
m=$(ls -la yepnope.min.js | awk '{ print $5}')
gzip -nfc --best yepnope.min.js > yepnope.min.js.gz
g=$(ls -la yepnope.min.js.gz | awk '{ print $5}')
echo "$m bytes minified, $g bytes gzipped"
rm yepnope.min.js.gz
if [ "--test" == "$1" ]; then
rm yepnope.min.js
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment