Skip to main content
Module

x/denomander/docs.ts>Denomander

Deno command-line interfaces made easy
Latest
class Denomander
implements PublicAPI
extends Kernel
Re-export
import { Denomander } from "https://deno.land/x/denomander@0.9.3/docs.ts";

The main class

Properties

optional
lastCommand: Command

Methods

action(callback: Function): Denomander

Implements the action of a command registered by the user

addOption(...options: Array<CustomOption>): Denomander
alias(...aliases: Array<string>): Denomander
argDescription(arg: string, description: string): Denomander
baseOption(value: string, description: string): Denomander
command(
value: string,
description?: string,
action?: Function,
): Denomander

Implements the option command

defaultCommand(
value: string,
description?: string,
action?: Function,
): Denomander

Implements the option command

description(description: string): Denomander

Implements the description of the previous mentioned command (by the user)

globalOption(value: string, description: string): Denomander
on(arg: string, callback: Function): Denomander

Implements the .on() option

option(
value: string,
description: string,
callback?: Function,
defaultValue?: any,
): Denomander

Implements the option command

parse(args: Array<string>)

Parses the args

requiredOption(
value: string,
description: string,
callback?: Function,
): Denomander

Implements the required option command

Lets user to customize the version method

subCommand(
value: string,
description?: string,
action?: Function,
): Denomander

Implements the option command