mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
use packages instead of path for modularize option
Former-commit-id: 9f8d3cc49fe3f8d21991e48b46845abd9101f171
This commit is contained in:
@@ -71,15 +71,28 @@
|
|||||||
|
|
||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
|
var paths = {
|
||||||
|
'shimmed': './abc/../' + modulePath,
|
||||||
|
'underscore': './xyz/../' + modulePath
|
||||||
|
};
|
||||||
|
|
||||||
|
var packages = [];
|
||||||
|
|
||||||
|
if (isModularize) {
|
||||||
|
packages.push({
|
||||||
|
'name': 'lodash',
|
||||||
|
'location': '.',
|
||||||
|
'main': 'lodash'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
paths.lodash = modulePath;
|
||||||
|
}
|
||||||
|
|
||||||
// load Lo-Dash as a module
|
// load Lo-Dash as a module
|
||||||
require({
|
require({
|
||||||
'baseUrl': baseUrl,
|
'baseUrl': baseUrl,
|
||||||
'urlArgs': 't=' + (+new Date),
|
'urlArgs': 't=' + (+new Date),
|
||||||
'paths': {
|
'paths': paths,
|
||||||
'lodash': modulePath,
|
|
||||||
'shimmed': './abc/../' + modulePath,
|
|
||||||
'underscore': './xyz/../' + modulePath
|
|
||||||
},
|
|
||||||
'aliases': [
|
'aliases': [
|
||||||
['shimmed', 'lodash'],
|
['shimmed', 'lodash'],
|
||||||
['underscore', 'lodash']
|
['underscore', 'lodash']
|
||||||
@@ -88,7 +101,8 @@
|
|||||||
'shimmed': {
|
'shimmed': {
|
||||||
'exports': '_'
|
'exports': '_'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
'packages': packages
|
||||||
},
|
},
|
||||||
['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
|
['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
|
||||||
if (shimmed && shimmed.noConflict) {
|
if (shimmed && shimmed.noConflict) {
|
||||||
|
|||||||
Reference in New Issue
Block a user