-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap files in UMD modules (including translations) #210
Comments
Thanks for the offer! Already implemented and merged in :) Cheers! |
I think the initial lines of picker.date and picker.time should go this way: (function ( factory ) {
// Register as an anonymous module.
if ( typeof define === 'function' && define.amd )
define( ['picker', 'jquery'], factory )
// Or using browser globals.
else factory( Picker, jQuery )
}(function( Picker, $ ) { Otherwise the pickers try to access the global jQuery object, which might be removed by jQuery.noConflict. It happened to be my case;) |
@ptrm thanks for pointing that out. Fixed as of v3.2.2 Cheers! |
What about translations?) |
Any updates on this? |
Opening this until that’s done |
We should handle this with webpack then. |
It would be much easier to use this with requirejs/browserify if we wrapped the 3 picker files (picker.js, picker.date.js and picker.time.js) in UMD modules (see http://github.com/umdjs/umd). I am going to try to implement this using the
grunt-umd
plugin for my own use, would you be willing to accept a PR with such a feature?The text was updated successfully, but these errors were encountered: