Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added compress.sh uglifier (requires node, uglify-js) and a .gitignor…

…e to ignore modernizr.min.js.
  • Loading branch information...
commit 5900d26b62ce7632af721cfa4c58196c0af1f34e 1 parent 837d839
Ben Alman cowboy authored
Showing with 14 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +13 −0 compress.sh
1  .gitignore
View
@@ -0,0 +1 @@
+modernizr.min.js
13 compress.sh
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.