Ensure category modules reference dependencies with relative paths.

Former-commit-id: 5a12a4b2f4cd3a56456238303e7d941b06f76d9f
This commit is contained in:
John-David Dalton
2013-07-14 13:10:46 -07:00
parent 3048ac2f6d
commit 0f9d20129d
2 changed files with 5 additions and 3 deletions

View File

@@ -829,8 +829,11 @@
fromPath || (fromPath = '');
return dependencies.map(function(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;
});
};
@@ -899,7 +902,7 @@
(function() {
var deps = _.invoke(categories, 'toLowerCase'),
depArgs = deps.join(', '),
depPaths = "['" + deps.join("', './") + "'], ",
depPaths = "['" + (deps.length ? './' + deps.join("', './") : '') + "'], ",
iife = [];
if (isAMD) {

View File

@@ -69,7 +69,6 @@
'test.js'
);
console.log(testPath)
QUnit.config.autostart = false;
// load Lo-Dash as a module