Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 05068af4148554798cc2f34d6d71dec0e6331fb0 1 parent 1bbd67b
Ghislain Seguin gseguin authored
Showing with 8 additions and 1 deletion.
  1. +1 −1  Makefile
  2. +7 −0 js/jquery.mobile.exports.js
2  Makefile
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 \
7 js/jquery.mobile.exports.js
View
@@ -0,0 +1,7 @@
+(function( $ ) {
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery.mobile", [], function () { return $.mobile; } );
+}
+
+}( jQuery ));
Please sign in to comment.
Something went wrong with that request. Please try again.