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

Integrate an appropriate UMD pattern #2

Closed
mikeric opened this issue May 10, 2012 · 2 comments
Closed

Integrate an appropriate UMD pattern #2

mikeric opened this issue May 10, 2012 · 2 comments

Comments

@mikeric
Copy link
Owner

mikeric commented May 10, 2012

Rivets.js needs to follow some sort of AMD + CommonJS module definition pattern.

@mikeric
Copy link
Owner Author

mikeric commented May 13, 2012

Added support for CommonJS and browser globals.

@mikeric mikeric closed this as completed May 13, 2012
@peter-schwier
Copy link

Please add two more lines so that AMD modules are also supported.

Change:

if module?
module.exports = rivets
else
@rivets = rivets

To:

if module?
module.exports = rivets
else if define?.amd
define([], rivets)
else
@rivets = rivets

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

No branches or pull requests

2 participants