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

Function swapPkgName

smoketests/helpers.js:13–20  ·  view source on GitHub ↗
(current, isSubPackage = false)

Source from the content-addressed store, hash-verified

11};
12
13const swapPkgName = (current, isSubPackage = false) => {
14 // info -> .info and vice-versa
15 const next = current.startsWith(".") ? current.slice(1) : `.${current}`;
16
17 console.log(` swapping ${current} with ${next}`);
18
19 fs.renameSync(getPkgPath(current, isSubPackage), getPkgPath(next, isSubPackage));
20};
21
22const CLI_ENTRY_PATH = path.resolve(ROOT_PATH, "./packages/webpack-cli/bin/cli.js");
23

Callers 4

runTestFunction · 0.85
runTestStdoutFunction · 0.85
runTestStdoutWithInputFunction · 0.85
runTestWithHelpFunction · 0.85

Calls 1

getPkgPathFunction · 0.85

Tested by

no test coverage detected