Permalink
Browse files

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

  • Loading branch information...
1 parent 1bbd67b commit 05068af4148554798cc2f34d6d71dec0e6331fb0 @gseguin gseguin committed Dec 22, 2011
Showing with 8 additions and 1 deletion.
  1. +1 −1 Makefile
  2. +7 −0 js/jquery.mobile.exports.js
View
@@ -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 \
@@ -0,0 +1,7 @@
+(function( $ ) {
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery.mobile", [], function () { return $.mobile; } );
+}
+
+}( jQuery ));

0 comments on commit 05068af

Please sign in to comment.