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

UMD-ready Underscore #1303

Closed
wants to merge 1 commit into from
Closed

UMD-ready Underscore #1303

wants to merge 1 commit into from

Conversation

bibz
Copy link

@bibz bibz commented Oct 8, 2013

Underscore.js is now an UMD module.

The UMD definition is based on https://github.com/umdjs/umd/blob/master/returnExports.js.

A stub noConflict function is provided in Underscore.js to retain API compatibility.
The real noConflict method is only defined once if Underscore.js is not loaded as-is in the browser (ie. as an AMD-module or in a Node.js environment).

A stub `noConflict` function is provided in Underscore.js to retain API compatibility.
The real `noConflict` method is only defined once if Underscore.js is not loaded as-is in the browser (ie. as an AMD-module or in a Node.js environment).
@bibz bibz closed this Oct 8, 2013
@bibz bibz reopened this Oct 8, 2013
@bibz
Copy link
Author

bibz commented Oct 8, 2013

Well, it's a patch over the 1.5.2 tag but it should rebase nicely on master too.

@Delapouite
Copy link

HI.
Did you have a look at this commit first ?
0d4b124#commitcomment-857644

@bibz
Copy link
Author

bibz commented Oct 8, 2013

Thanks for the pointer, did not see it!

Though Backbone has been updated since and if require is provided, it will load the Underscore.js.
See jashkenas/backbone#818.

@bibz
Copy link
Author

bibz commented Oct 8, 2013

Nevermind my previous comment, it is only a partial response to the issue pointed out by @Delapouite .

@bibz
Copy link
Author

bibz commented Oct 8, 2013

My apologies, @jashkenas made it clear in /pull/431.

edit: if anyone is interested in using an AMD-compatible version of jashkenas/underscore still backwards compatible, one can fork jrburke/underscore@alwaysglobal and fast-forward the updates.
That is what I did for 1.5.2-AMD (bibz/underscore@7748670).

@bibz bibz closed this Oct 8, 2013
@bibz bibz deleted the 1.5.2-UMD branch October 8, 2013 10:07
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.

2 participants