From 295253d0cd96c980be3f31a79ef8c6c808d2ae30 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Tue, 26 Jul 2011 16:17:34 -0400 Subject: [PATCH] Switch out Makefile for minify shell script --- Makefile | 24 ------------------------ _config.yml | 2 +- minify.sh | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 25 deletions(-) delete mode 100644 Makefile create mode 100755 minify.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index 000392c..0000000 --- a/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -JS_ENGINE ?= `which node nodejs` -JS = jquery.isotope.js -JS_MIN = jquery.isotope.min.js -SITE = isotope-site - -# minifies jquery.isotope.js -# requires NodeJS and global uglify-js -min: ${ISO} - @@if test ! -z ${JS_ENGINE}; then \ - echo "Minifying" ${JS}; \ - uglifyjs ${JS} > ${JS_MIN}.tmp; \ - echo ';' >> ${JS_MIN}.tmp; \ - sed 's/\*\//&§/g; y/§/\n/;' ${JS_MIN}.tmp > ${JS_MIN}; \ - rm ${JS_MIN}.tmp; \ - else \ - echo "NodeJS required for minification."; \ - fi - -# creates zip file of site -zip: _site - mkdir ${SITE} - cp -r _site/ ${SITE} - zip -r ~/Desktop/${SITE}.zip ${SITE}/ - rm -rf ${SITE} \ No newline at end of file diff --git a/_config.yml b/_config.yml index b12b592..edc36aa 100644 --- a/_config.yml +++ b/_config.yml @@ -3,7 +3,7 @@ permalink: /:categories/:title.html pygments: true isotope_js: jquery.isotope.min.js jquery_js: js/jquery-1.6.1.min.js -exclude: [ Makefile ] +exclude: [ minify.sh ] random_order: [ 11, 91, 63, 38, 4, 25, 94, 29, 60, 48, 32, 67, 33, 37, 39, 84, 40, 7, 96, 8, 97, 9, 14, 99, 15, 19, 5, 36, 114, 20, 30, 80, 13, 47, 21, 3, 22, 31, 54, 66, 55, 71, 1, 23, 41, 70, 2, 77, 117, 79, 42, 95, 46, 50, 69, 53, 56, 72, 51, 73, 59, 74, 35, 49, 101, 88, 34, 76, 102, 75, 103, 81, 58, 6, 82, 26, 27, 44, 83, 45, 86, 68, 87, 104, 105, 10, 85, 43, 12, 109, 110, 113, 28, 106, 107, 108, 115, 62, 116, 0, 57, 111, 112, 61, 89, 90, 64, 65, 92, 93, 78, 24, 98, 100, 16, 17, 18, 52 ] diff --git a/minify.sh b/minify.sh new file mode 100755 index 0000000..be68ff9 --- /dev/null +++ b/minify.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# minifies jquery.isotope.js +# requires nodejs & uglifyjs + +JS=jquery.isotope.js +JS_MIN=jquery.isotope.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