mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-17 21:01:00 +00:00
Added wrapper to export as an AMD modules
removed jquery.mobile.exports
This commit is contained in:
parent
b33c4fb815
commit
1a58e2ae37
4 changed files with 17 additions and 8 deletions
4
Makefile
4
Makefile
|
|
@ -117,9 +117,11 @@ js: init
|
|||
-classpath build/js.jar:build/google-compiler-20111003.jar org.mozilla.javascript.tools.shell.Main \
|
||||
external/r.js/dist/r.js \
|
||||
-o baseUrl="js" \
|
||||
include=jquery.mobile,jquery.mobile.exports exclude=jquery,order \
|
||||
include=jquery.mobile exclude=jquery,order \
|
||||
out=${OUTPUT}/${NAME}.compiled.js \
|
||||
pragmasOnSave.jqmBuildExclude=true \
|
||||
wrap.start=build/wrap.start \
|
||||
wrap.end=build/wrap.end \
|
||||
findNestedDependencies=true \
|
||||
skipModuleInsertion=true \
|
||||
optimize=none
|
||||
|
|
|
|||
2
build/wrap.end
Normal file
2
build/wrap.end
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
}));
|
||||
12
build/wrap.start
Normal file
12
build/wrap.start
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
(function ( root, doc, factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery" ], function ( $ ) {
|
||||
factory( $, root, doc );
|
||||
return $.mobile;
|
||||
});
|
||||
} else {
|
||||
// Browser globals
|
||||
factory( root.jQuery, root, doc );
|
||||
}
|
||||
}( this, document, function ( $, window, document, undefined ) {
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
(function( $ ) {
|
||||
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
define( "jquery.mobile", [], function () { return $.mobile; } );
|
||||
}
|
||||
|
||||
}( jQuery ));
|
||||
Loading…
Reference in a new issue