This repository was archived by the owner on Dec 4, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -168,15 +168,15 @@ function resolvePackageNameByPath(packagePath) {
168
168
}
169
169
170
170
/**
171
- * Recursivly search for node module inside node_modules dir
171
+ * Recursively search for node module inside node_modules dir
172
172
* This function propegate up until it get's to the root provided then stops
173
173
*
174
174
* @param {string } nmPath - package name
175
175
* @param {string } workingDir - dir to start searching of
176
176
* @param {string } root - path to dir to stop the search
177
177
* @returns The resolved path for the package directory
178
178
*/
179
- function resolveModulePath ( nmPath , workingDir , root ) {
179
+ export function resolveModulePath ( nmPath : string , workingDir : string , root : string ) {
180
180
const pathToCheck = path . resolve ( workingDir , 'node_modules' , nmPath ) ;
181
181
182
182
if ( fs . existsSync ( pathToCheck ) ) {
Original file line number Diff line number Diff line change 1
- import { getDependencyTree , resolveNodePackage } from './build-tree' ;
1
+ import { getDependencyTree , resolveNodePackage , resolveModulePath } from './build-tree' ;
2
2
3
3
export {
4
4
resolveNodePackage ,
5
+ resolveModulePath ,
5
6
getDependencyTree
6
7
} ;
Original file line number Diff line number Diff line change 1
1
import 'regenerator-runtime/runtime' ;
2
2
// import { bindAction, bindSpecificComponentsAction } from './actions';
3
- import { getDependencyTree , resolveNodePackage } from './dependency-builder' ;
3
+ import { getDependencyTree , resolveNodePackage , resolveModulePath } from './dependency-builder' ;
4
4
import PackageJson from './package-json/package-json' ;
5
5
6
6
// const lifecycleHooks = {
@@ -18,6 +18,7 @@ module.exports = {
18
18
// bindSpecificComponents: bindSpecificComponentsAction,
19
19
getDependencyTree,
20
20
resolveNodePackage,
21
+ resolveModulePath,
21
22
PackageJson
22
23
} ;
23
24
You can’t perform that action at this time.
0 commit comments