Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed js and css targets to use r.js and r-jqm.js

  • Loading branch information...
commit ca6fe9bede6dae245e6845d3462abe227446dd1a 1 parent aa1a3cd
@gseguin gseguin authored
Showing with 17 additions and 17 deletions.
  1. +17 −17 Makefile
View
34 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
# -------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.