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

Method padWidth

packages/webpack-cli/src/webpack-cli.ts:1465–1473  ·  view source on GitHub ↗
(command, helper: Help)

Source from the content-addressed store, hash-verified

1463 });
1464 },
1465 padWidth(command, helper: Help) {
1466 return Math.max(
1467 helper.longestArgumentTermLength(command, helper),
1468 helper.longestOptionTermLength(command, helper),
1469 // For global options
1470 helper.longestOptionTermLength(program, helper),
1471 helper.longestSubcommandTermLength(isGlobalHelp ? program : command, helper),
1472 );
1473 },
1474 formatHelp: (command, helper: Help) => {
1475 // `helper.formatItem` is ANSI-aware (it pads using the visible width), so we
1476 // can colorize the term and keep every description column aligned.

Callers 1

formatItemMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected