1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = resolveNodeModuleDir;
|
7 | var _findPackageDependencyDir = require("./findPackageDependencyDir");
|
8 | var _errors = require("./errors");
|
9 |
|
10 |
|
11 |
|
12 | function resolveNodeModuleDir(root, packageName) {
|
13 | const packageDependencyDirectory = (0, _findPackageDependencyDir.findPackageDependencyDir)(packageName, {
|
14 | startDir: root
|
15 | });
|
16 | if (packageDependencyDirectory === undefined) {
|
17 | throw new _errors.CLIError(`Node module directory for package ${packageName} was not found`);
|
18 | } else {
|
19 | return packageDependencyDirectory;
|
20 | }
|
21 | }
|
22 |
|
23 |
|
\ | No newline at end of file |