use a new variable for better debug output

Because tryResolveAppPath returns undefined when it can’t resolve a
path the debug output for directories that cannot be resolved is fairly
useless.

You get output like this:
  loopback👢compiler Skipping unknown module source dir undefined
+0ms

When you want output like this:
loopback👢compiler Skipping unknown module source dir "./models"
+0ms
This commit is contained in:
Bryan Clark 2015-05-29 09:03:08 -07:00
parent a06aaba1cb
commit 2e63631b31
1 changed files with 3 additions and 3 deletions

View File

@ -689,12 +689,12 @@ function buildAllMixinInstructions(appRootDir, mixinDirs, mixinSources, options,
function findMixinDefinitions(appRootDir, sourceDirs, extensions) {
var files = [];
sourceDirs.forEach(function(dir) {
dir = tryResolveAppPath(appRootDir, dir);
if (!dir) {
var path = tryResolveAppPath(appRootDir, dir);
if (!path) {
debug('Skipping unknown module source dir %j', dir);
return;
}
files = files.concat(findScripts(dir, extensions));
files = files.concat(findScripts(path, extensions));
});
return files;
}