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

Added support for RequireJS, CommonJS #176

Merged
merged 2 commits into from
Feb 22, 2016
Merged

Added support for RequireJS, CommonJS #176

merged 2 commits into from
Feb 22, 2016

Conversation

byonchev
Copy link
Contributor

No description provided.

@moust
Copy link

moust commented Feb 19, 2016

👍

define(['moment'], factory);
} else if ( typeof exports === 'object' ) {
// Node/CommonJS
module.exports = factory();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you be doing factory(require('moment')) here? The moment-less build wont have moment bundled in, so moment will be undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I was focused on the AMD part and I missed that.

@Twipped
Copy link
Owner

Twipped commented Feb 22, 2016

Thank you for making this. I had been wanting to add a UMD wrapper but hadn't gotten around to it. I think there's still some ways this could be cleaned up more, but this works for now.

Twipped added a commit that referenced this pull request Feb 22, 2016
Added support for RequireJS, CommonJS
@Twipped Twipped merged commit df20e13 into Twipped:dev Feb 22, 2016
@Twipped
Copy link
Owner

Twipped commented Feb 25, 2016

This is now released in version 0.6

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

Successfully merging this pull request may close these issues.

3 participants