mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Ensure category modules reference dependencies with relative paths.
Former-commit-id: 5a12a4b2f4cd3a56456238303e7d941b06f76d9f
This commit is contained in:
7
build.js
7
build.js
@@ -829,8 +829,11 @@
|
|||||||
fromPath || (fromPath = '');
|
fromPath || (fromPath = '');
|
||||||
return dependencies.map(function(depName) {
|
return dependencies.map(function(depName) {
|
||||||
var toPath = getPath(depName),
|
var toPath = getPath(depName),
|
||||||
relative = (path.relative(fromPath, toPath) || '.').replace(RegExp(path.sepEscaped, 'g'), sep);
|
relative = path.relative(fromPath, toPath).replace(RegExp(path.sepEscaped, 'g'), sep);
|
||||||
|
|
||||||
|
if (relative.charAt(0) != '.') {
|
||||||
|
relative = '.' + (relative ? sep + relative : '');
|
||||||
|
}
|
||||||
return relative + sep + depName;
|
return relative + sep + depName;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -899,7 +902,7 @@
|
|||||||
(function() {
|
(function() {
|
||||||
var deps = _.invoke(categories, 'toLowerCase'),
|
var deps = _.invoke(categories, 'toLowerCase'),
|
||||||
depArgs = deps.join(', '),
|
depArgs = deps.join(', '),
|
||||||
depPaths = "['" + deps.join("', './") + "'], ",
|
depPaths = "['" + (deps.length ? './' + deps.join("', './") : '') + "'], ",
|
||||||
iife = [];
|
iife = [];
|
||||||
|
|
||||||
if (isAMD) {
|
if (isAMD) {
|
||||||
|
|||||||
@@ -69,7 +69,6 @@
|
|||||||
'test.js'
|
'test.js'
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(testPath)
|
|
||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
|
|
||||||
// load Lo-Dash as a module
|
// load Lo-Dash as a module
|
||||||
|
|||||||
Reference in New Issue
Block a user