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

Method constructor

packages/webpack-cli/src/webpack-cli.ts:532–546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

530 program: Command;
531
532 constructor() {
533 this.logger = this.getLogger();
534
535 // Initialize program
536 this.program = program as Command;
537 this.program.name("webpack");
538 this.program.configureOutput({
539 writeErr: (str) => {
540 this.logger.error(str);
541 },
542 outputError: (str, write) => {
543 write(`Error: ${this.capitalizeFirstLetter(str.replace(/^error:/, "").trim())}`);
544 },
545 });
546 }
547
548 #createColors(useColor?: boolean): Colors {
549 let pkg: typeof webpack | undefined;

Callers

nothing calls this directly

Calls 3

getLoggerMethod · 0.95
capitalizeFirstLetterMethod · 0.95
writeFunction · 0.85

Tested by

no test coverage detected