Skip to content

Commit

Permalink
Switch out Makefile for minify shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Jul 26, 2011
1 parent 6c1fb78 commit c1fcc06
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 25 deletions.
24 changes: 0 additions & 24 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ permalink: /:categories/:title.html
pygments: true
masonry_js: jquery.masonry.min.js
jquery_js: js/jquery-1.6.1.min.js
exclude: [ Makefile, notes.mdown ]
exclude: [ minify.sh, notes.mdown ]
14 changes: 14 additions & 0 deletions minify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# minifies jquery.masonry.js
# requires nodejs & uglifyjs

JS=jquery.masonry.js
JS_MIN=jquery.masonry.min.js
TMP=$JS_MIN.tmp

uglifyjs $JS > $TMP
echo ';' >> $TMP
sed 's/\*\//&§/g; y/§/\n/;' $TMP > $JS_MIN
rm $TMP
echo "Minified" $JS "as" $JS_MIN

0 comments on commit c1fcc06

Please sign in to comment.