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

Improved Branching support for Node/CommonJS, AMD and Browser globals #147

Closed
wants to merge 1 commit into from
Closed

Conversation

benbabics
Copy link

I forked this while using in-conjunction with RequireJS, so I thought I'd issue a pull request. This is similar to the branching found for the BackboneJS AMD support.

@PaulUithol
Copy link
Owner

Duplicate of #57. Following Backbone's lead on this one..

@PaulUithol PaulUithol closed this Jun 19, 2012
@benbabics
Copy link
Author

Perhaps you're using a newer version of Backbone with AMD support? I've followed and modeled my change after the AMD branch:
https://raw.github.com/amdjs/backbone/master/backbone.js

This approach may work for Node/CommonJS, but the following breaks when using AMD as it has a dependency on Backbone (just as Backbone does for Underscore):

require([ 'underscore', 'backbone', 'backbone-relational' ], function( _, Backbone ) {
  // 
});

This will throw an error because Backbone is undefined when using AMD. The approach Backbone AMD (which I followed) takes accounts for AMD support.

@hacking-robot
Copy link

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

Successfully merging this pull request may close these issues.

None yet

3 participants