lodash: Add support for more AMD build optimizers and allow aliasing as the "underscore" module. [jddalton]

Former-commit-id: 6b3fa45d19f6a55aa7565bcb4d9221f6f159e9c9
This commit is contained in:
John-David Dalton
2012-04-24 18:15:47 -04:00
parent bb09d77eb5
commit f9358531ad
5 changed files with 37 additions and 28 deletions

View File

@@ -61,15 +61,14 @@ load('lodash.js');
In an AMD loader like [RequireJS](http://requirejs.org/):
~~~ js
// opt-in
define.amd.lodash = true;
// Lo-Dash is defined as an anonymous module so, through path mapping, it can be
// referenced as the "underscore" module
require({
'paths': {
'lodash': 'path/to/lodash'
'underscore': 'path/to/lodash'
}
},
['lodash'], function(_) {
['underscore'], function(_) {
console.log(_.VERSION);
});
~~~