mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Ensure category modules reference dependencies with relative paths.
Former-commit-id: 143360f03cc30f759ebd8e5e949b0dd8a1b937b5
This commit is contained in:
5
build.js
5
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;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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