(path)
| 76 | } |
| 77 | |
| 78 | function addPath (path) { |
| 79 | var parent |
| 80 | path = nodePath.normalize(path) |
| 81 | |
| 82 | if (modulePaths.indexOf(path) === -1) { |
| 83 | modulePaths.push(path) |
| 84 | // Enable the search path for the current top-level module |
| 85 | var mainModule = getMainModule() |
| 86 | if (mainModule) { |
| 87 | addPathHelper(path, mainModule.paths) |
| 88 | } |
| 89 | parent = module.parent |
| 90 | |
| 91 | // Also modify the paths of the module that was used to load the |
| 92 | // app-module-paths module and all of it's parents |
| 93 | while (parent && parent !== mainModule) { |
| 94 | addPathHelper(path, parent.paths) |
| 95 | parent = parent.parent |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | function addAliases (aliases) { |
| 101 | for (var alias in aliases) { |
no test coverage detected