(change: PlopActionHooksChanges)
| 30 | }; |
| 31 | |
| 32 | function 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 | |
| 50 | function onFailureHandler(failure: PlopActionHooksFailures): void { |
| 51 | throw new Error(failure.error); |
nothing calls this directly
no outgoing calls
no test coverage detected