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

Function onSuccessHandler

packages/create-webpack-app/src/utils/logger.ts:32–48  ·  view source on GitHub ↗
(change: PlopActionHooksChanges)

Source from the content-addressed store, hash-verified

30};
31
32function onSuccessHandler(change: PlopActionHooksChanges): void {
33 switch (change.type) {
34 case "generate-files": {
35 for (const line of change.path.split("\n")) {
36 const [operationType = "", renderPath = ""] = line.split("|");
37 console.log(
38 `\t${typeDisplay[operationType]} ${normalize(relative(process.cwd(), renderPath))}`,
39 );
40 }
41 break;
42 }
43 case "install-dependencies": {
44 logger.success(change.path);
45 break;
46 }
47 }
48}
49
50function onFailureHandler(failure: PlopActionHooksFailures): void {
51 throw new Error(failure.error);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected