Skip to content

Commit

Permalink
Added compress.sh uglifier (requires node, uglify-js) and a .gitignor…
Browse files Browse the repository at this point in the history
…e to ignore modernizr.min.js.
  • Loading branch information
cowboy committed Apr 12, 2011
1 parent 837d839 commit 5900d26
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
modernizr.min.js
13 changes: 13 additions & 0 deletions compress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#/bin/bash

IN=modernizr.js
OUT=modernizr.min.js

SIZE_MIN=$(uglifyjs "$IN" --extra --unsafe | tee "$OUT" | wc -c)
SIZE_GZIP=$(gzip -nfc --best "$OUT" | wc -c)

echo $SIZE_MIN bytes minified, $SIZE_GZIP bytes gzipped

if [ "$1" == "--test" ]; then
rm "$OUT"
fi

0 comments on commit 5900d26

Please sign in to comment.