mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
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:
@@ -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);
|
||||
});
|
||||
~~~
|
||||
|
||||
Reference in New Issue
Block a user