Skip to main content
Module

x/dmm/deps.ts>Line.CLI

Lightweight Deno Module Manager
Latest
class Line.CLI
import { Line } from "https://deno.land/x/dmm@v2.1.2/deps.ts";
const { CLI } = Line;

A class to help build CLIs. This class is responsible for the initial set up of the CLI. Specifically, it sets up the main command so that it can show help menus. If a main command contains subcommands, then those subcommands are set up in the main command when it is constructed.

Constructors

new
CLI(options: ICLIOptions)

Construct an object of this class.

Properties

description: string

This CLI's description.

main_command: MainCommand

See MainCommand.

name: string

This CLI's name.

version: string

This CLI's version.

Methods

protected
showHelp(): void

This method is a wrapper around the main command's help menu. Reason it needs to be wrapped is because we need to show the CLI's name and description before showing the main command's help menu.

protected
showVersion(): void

Show this CLI's version.

run(): Promise<void>

Run this CLI.