From ca6fe9bede6dae245e6845d3462abe227446dd1a Mon Sep 17 00:00:00 2001 From: Ghislain Seguin Date: Thu, 8 Dec 2011 13:48:39 -0800 Subject: [PATCH] Changed js and css targets to use r.js and r-jqm.js --- Makefile | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 2f1ef776..8d33b9ce 100644 --- a/Makefile +++ b/Makefile @@ -73,6 +73,10 @@ STRUCTURE = jquery.mobile.structure deploy: NAME = jquery.mobile-${VER_OFFICIAL} deploy: STRUCTURE = jquery.mobile.structure-${VER_OFFICIAL} +#Wrapper +WRAP_START = "(function( $$, undefined ) {" +WRAP_END = "}( jQuery ));" + # The CSS theme being used THEME = default @@ -89,17 +93,14 @@ all: init css js zip notify # Build and minify the CSS files css: init # Build the CSS file with the theme included + @@node js/r.js -o cssIn=css/themes/default/jquery.mobile.theme.css out=${OUTPUT}/${NAME}.tmp.css @@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${NAME}.css - @@cat ${CSSTHEMEFILES} ${CSSFILES} >> ${OUTPUT}/${NAME}.css - # ..... and then minify it + @@cat ${OUTPUT}/${NAME}.tmp.css >> ${OUTPUT}/${NAME}.css + @@rm ${OUTPUT}/${NAME}.tmp.css + @@node js/r.js -o cssIn=css/themes/default/jquery.mobile.theme.css optimizeCss=standard out=${OUTPUT}/${NAME}.tmp.min.css @@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.css - @@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${NAME}.css >> ${OUTPUT}/${NAME}.min.css - # Build the CSS Structure-only file - @@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${STRUCTURE}.css - @@cat ${CSSFILES} >> ${OUTPUT}/${STRUCTURE}.css - # ..... and then minify it - @@echo ${VER_MIN} > ${OUTPUT}/${STRUCTURE}.min.css - @@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${STRUCTURE}.css >> ${OUTPUT}/${STRUCTURE}.min.css + @@cat ${OUTPUT}/${NAME}.tmp.min.css >> ${OUTPUT}/${NAME}.min.css + @@rm ${OUTPUT}/${NAME}.tmp.min.css # ..... and then copy in the images @@cp -R css/themes/${THEME}/images ${OUTPUT}/ # Css portion is complete. @@ -137,16 +138,15 @@ init: # Build and minify the JS files js: init # Build the JavaScript file + @@node js/r-jqm.js -o baseUrl="js" include=jquery.mobile exclude=jquery,order out=${OUTPUT}/${NAME}.tmp.js wrap.start=${WRAP_START} wrap.end=${WRAP_END} optimize=none @@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${NAME}.js - @@cat ${JSFILES} >> ${OUTPUT}/${NAME}.js - # ..... and then minify it - @@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.js - @@java -XX:ReservedCodeCacheSize=64m \ - -jar build/google-compiler-20111003.jar \ - --js ${OUTPUT}/${NAME}.js \ - --js_output_file ${OUTPUT}/${NAME}.tmp.js - @@cat ${OUTPUT}/${NAME}.tmp.js >> ${OUTPUT}/${NAME}.min.js + @@cat ${OUTPUT}/${NAME}.tmp.js | sed "s/'order!/'/g" >> ${OUTPUT}/${NAME}.js @@rm ${OUTPUT}/${NAME}.tmp.js + # Build the minified JavaScript file + @@node js/r-jqm.js -o baseUrl="js" include=jquery.mobile exclude=jquery,order out=${OUTPUT}/${NAME}.tmp.min.js wrap.start=${WRAP_START} wrap.end=${WRAP_END} optimize=uglify + @@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.js + @@cat ${OUTPUT}/${NAME}.tmp.min.js | sed "s/'order!/'/g" >> ${OUTPUT}/${NAME}.min.js + @@rm ${OUTPUT}/${NAME}.tmp.min.js # -------------------------------------------------