@@ -73,6 +73,10 @@ STRUCTURE = jquery.mobile.structure
7373deploy : NAME = jquery.mobile-${VER_OFFICIAL}
7474deploy : STRUCTURE = jquery.mobile.structure-${VER_OFFICIAL}
7575
76+ # Wrapper
77+ WRAP_START = "(function( $$, undefined ) {"
78+ WRAP_END = "}( jQuery ));"
79+
7680# The CSS theme being used
7781THEME = default
7882
@@ -89,17 +93,14 @@ all: init css js zip notify
8993# Build and minify the CSS files
9094css : init
9195 # Build the CSS file with the theme included
96+ @@node js/r.js -o cssIn=css/themes/default/jquery.mobile.theme.css out=${OUTPUT} /${NAME} .tmp.css
9297 @@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT} /${NAME} .css
93- @@cat ${CSSTHEMEFILES} ${CSSFILES} >> ${OUTPUT} /${NAME} .css
94- # ..... and then minify it
98+ @@cat ${OUTPUT} /${NAME} .tmp.css >> ${OUTPUT} /${NAME} .css
99+ @@rm ${OUTPUT} /${NAME} .tmp.css
100+ @@node js/r.js -o cssIn=css/themes/default/jquery.mobile.theme.css optimizeCss=standard out=${OUTPUT} /${NAME} .tmp.min.css
95101 @@echo ${VER_MIN} > ${OUTPUT} /${NAME} .min.css
96- @@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT} /${NAME} .css >> ${OUTPUT} /${NAME} .min.css
97- # Build the CSS Structure-only file
98- @@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT} /${STRUCTURE} .css
99- @@cat ${CSSFILES} >> ${OUTPUT} /${STRUCTURE} .css
100- # ..... and then minify it
101- @@echo ${VER_MIN} > ${OUTPUT} /${STRUCTURE} .min.css
102- @@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT} /${STRUCTURE} .css >> ${OUTPUT} /${STRUCTURE} .min.css
102+ @@cat ${OUTPUT} /${NAME} .tmp.min.css >> ${OUTPUT} /${NAME} .min.css
103+ @@rm ${OUTPUT} /${NAME} .tmp.min.css
103104 # ..... and then copy in the images
104105 @@cp -R css/themes/${THEME} /images ${OUTPUT} /
105106 # Css portion is complete.
@@ -137,16 +138,15 @@ init:
137138# Build and minify the JS files
138139js : init
139140 # Build the JavaScript file
141+ @@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
140142 @@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT} /${NAME} .js
141- @@cat ${JSFILES} >> ${OUTPUT} /${NAME} .js
142- # ..... and then minify it
143- @@echo ${VER_MIN} > ${OUTPUT} /${NAME} .min.js
144- @@java -XX:ReservedCodeCacheSize=64m \
145- -jar build/google-compiler-20111003.jar \
146- --js ${OUTPUT} /${NAME} .js \
147- --js_output_file ${OUTPUT} /${NAME} .tmp.js
148- @@cat ${OUTPUT} /${NAME} .tmp.js >> ${OUTPUT} /${NAME} .min.js
143+ @@cat ${OUTPUT} /${NAME} .tmp.js | sed " s/'order!/'/g" >> ${OUTPUT} /${NAME} .js
149144 @@rm ${OUTPUT} /${NAME} .tmp.js
145+ # Build the minified JavaScript file
146+ @@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
147+ @@echo ${VER_MIN} > ${OUTPUT} /${NAME} .min.js
148+ @@cat ${OUTPUT} /${NAME} .tmp.min.js | sed " s/'order!/'/g" >> ${OUTPUT} /${NAME} .min.js
149+ @@rm ${OUTPUT} /${NAME} .tmp.min.js
150150 # -------------------------------------------------
151151
152152
0 commit comments