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

Function createProcess

test/utils/test-utils.js:42–57  ·  view source on GitHub ↗
({ execaNode, execa }, cwd, args, options)

Source from the content-addressed store, hash-verified

40 * @returns {import("execa").Result} child process
41 */
42const createProcess = ({ execaNode, execa }, cwd, args, options) => {
43 const { nodeOptions = [] } = options;
44 const processExecutor = nodeOptions.length ? execaNode : execa;
45
46 return processExecutor(
47 typeof options.executorPath !== "undefined" ? options.executorPath : WEBPACK_PATH,
48 args || [],
49 {
50 cwd: path.resolve(cwd),
51 reject: false,
52 stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe",
53 maxBuffer: Infinity,
54 ...options,
55 },
56 );
57};
58
59/**
60 * Run the webpack CLI for a test case.

Callers 3

runFunction · 0.85
runWatchFunction · 0.85
runPromptWithAnswersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected