Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.1.7
Fetching contributors…

Cannot retrieve contributors at this time

executable file 17 lines (12 sloc) 0.44 kb
#!/bin/bash
# minifies jquery.masonry.js
# requires nodejs & uglifyjs
IN=jquery.masonry.js
OUT=jquery.masonry.min.js
# remove any lines that begin with /*jshint or /*global
# then, minify with Uglify JS
# then, add newline characters after `*/`, but not last newline character
awk '!/^\/\*[jshint|global]/' $IN \
| uglifyjs \
| awk '{ORS=""; gsub(/\*\//,"*/\n"); if (NR!=1) print "\n"; print;}' > $OUT
echo "Minified" $IN "as" $OUT
Jump to Line
Something went wrong with that request. Please try again.