utils
The entry point of the helpers that a plugin uses to walk the commands of a CLI.
Example
js
import { getCommandSubCommands, resolveLazyCommand } from 'gunshi/utils'
const command = await resolveLazyCommand(lazyCommand, 'build', true)
const subCommands = getCommandSubCommands(command)Functions
| Function | Description |
|---|---|
| getCommandSubCommands | Get the sub-commands of a command as a normalized Map. |
| isLazyCommand | Check if the given command is a LazyCommand. |
| kebabnize | Convert a string to kebab-case. |
| resolveLazyCommand | Resolve a lazy command to a Command. |
