mirror of https://github.com/metafizzy/isotope
David DeSandro
11 years ago
4 changed files with 13 additions and 20 deletions
File diff suppressed because one or more lines are too long
@ -1,15 +1,9 @@ |
|||||||
#!/bin/bash |
#!/bin/bash |
||||||
|
|
||||||
# minifies jquery.isotope.js |
# minifies jquery.isotope.js |
||||||
# requires nodejs & uglifyjs |
# requires nodejs & uglify-js |
||||||
|
|
||||||
IN=jquery.isotope.js |
IN=jquery.isotope.js |
||||||
OUT=jquery.isotope.min.js |
OUT=jquery.isotope.min.js |
||||||
|
|
||||||
# remove any lines that begin with /*jshint or /*global |
uglifyjs $IN --compress conditionals=true --mangle --comments --output $OUT |
||||||
# 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 |
|
||||||
|
Loading…
Reference in new issue