diff options
author | Rafael Xavier de Souza <rxaviers@gmail.com> | 2013-07-12 13:40:48 -0300 |
---|---|---|
committer | Rafael Xavier de Souza <rxaviers@gmail.com> | 2014-01-24 18:22:14 -0200 |
commit | 96e027e4b14345722cc39589f59ce2ce5e94b991 (patch) | |
tree | ca32a2fff151af28597c158198550eca6e5b8f18 /ui/jquery.ui.datepicker.js | |
parent | 2651f4571e76979d93cf10d50edc452b0311a5f2 (diff) | |
download | jquery-ui-96e027e4b14345722cc39589f59ce2ce5e94b991.tar.gz jquery-ui-96e027e4b14345722cc39589f59ce2ce5e94b991.zip |
All: Wrap source files with UMD return exports
Ref #9464
Ref gh-1029
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r-- | ui/jquery.ui.datepicker.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index e4961a1df..19bc61f8f 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -11,7 +11,20 @@ * Depends: * jquery.ui.core.js */ -(function( $, undefined ) { +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ + "jquery", + "./jquery.ui.core" + ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { $.extend($.ui, { datepicker: { version: "@VERSION" } }); @@ -2056,4 +2069,6 @@ $.datepicker.initialized = false; $.datepicker.uuid = new Date().getTime(); $.datepicker.version = "@VERSION"; -})(jQuery); +return $.datepicker; + +})); |