Skip to content

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 ​

FunctionDescription
getCommandSubCommandsGet the sub-commands of a command as a normalized Map.
isLazyCommandCheck if the given command is a LazyCommand.
kebabnizeConvert a string to kebab-case.
resolveLazyCommandResolve a lazy command to a Command.

Released under the MIT License.