Expose jquery.mobile as an AMD module if running in an AMD env

This commit is contained in:
Ghislain Seguin 2011-12-22 15:52:34 -08:00 committed by scottjehl
parent c31e7173d2
commit 02baaf67f7
2 changed files with 8 additions and 1 deletions

View file

@ -102,7 +102,7 @@ init:
js: init
# Build the JavaScript file
@@node external/r.js -o baseUrl="js" \
include=jquery.mobile exclude=jquery,order \
include=jquery.mobile,jquery.mobile.exports exclude=jquery,order \
out=${OUTPUT}/${NAME}.tmp.js \
pragmasOnSave.jqmBuildExclude=true \
skipModuleInsertion=true \

View file

@ -0,0 +1,7 @@
(function( $ ) {
if ( typeof define === "function" && define.amd ) {
define( "jquery.mobile", [], function () { return $.mobile; } );
}
}( jQuery ));