MCPcopy Create free account
hub / github.com/webpack/webpack-cli / getPkgPath

Function getPkgPath

smoketests/helpers.js:7–11  ·  view source on GitHub ↗
(pkg, isSubPackage)

Source from the content-addressed store, hash-verified

5const ROOT_PATH = process.env.GITHUB_WORKSPACE || path.resolve(__dirname, "..");
6
7const getPkgPath = (pkg, isSubPackage) => {
8 const pkgPath = isSubPackage ? `./node_modules/@webpack-cli/${pkg}` : `./node_modules/${pkg}`;
9
10 return path.resolve(ROOT_PATH, pkgPath);
11};
12
13const swapPkgName = (current, isSubPackage = false) => {
14 // info -> .info and vice-versa

Callers 1

swapPkgNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected