Skip to content
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

Closed
joefiorini opened this issue Aug 22, 2013 · 7 comments
Closed

Wrap files in UMD modules (including translations) #210

joefiorini opened this issue Aug 22, 2013 · 7 comments
Labels

Comments

@joefiorini
Copy link

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?

@amsul amsul closed this as completed in c9f16cf Aug 24, 2013
@amsul
Copy link
Owner

amsul commented Aug 24, 2013

Thanks for the offer! Already implemented and merged in :)

Cheers!

@ptrm
Copy link

ptrm commented Sep 5, 2013

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;)

@amsul amsul reopened this Sep 16, 2013
@amsul
Copy link
Owner

amsul commented Sep 20, 2013

@ptrm thanks for pointing that out. Fixed as of v3.2.2

Cheers!

@amsul amsul closed this as completed Sep 20, 2013
@mightydes
Copy link

What about translations?)

@peschee
Copy link

peschee commented Apr 14, 2015

What about translations?

Any updates on this?

@amsul
Copy link
Owner

amsul commented Apr 20, 2015

Opening this until that’s done

@amsul amsul reopened this Apr 20, 2015
@amsul amsul changed the title Wrap files in UMD modules Wrap files in UMD modules (including translations) Apr 20, 2015
@DanielRuf
Copy link
Collaborator

We should handle this with webpack then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants