1.1.5 • Published 5 years ago
gochoo v1.1.5
Gochoo the corporal of your terminals
import Gochoo from "gochoo"
const gochoo = new Gochoo(argv = process.args)
for start Gochoo for your terminal
Methods of Gochoo and return
gochoo.alias(optionname: string, aliasname: string): Gochoo // create an alias exemple: -v is an alias of--version
gochoo.command(command: string, description: string, parameters?: {name: string, exec: (this: Gochoo, next: next, ...params: string | number | boolean) =>void} & {[x: string]: "string" | "number" | "boolean" | "link"}): Gochoo // create a command exemple: compile ./path/to/file with command function compile [pathfile]
gochoo.findExec(option: string): Gochoo // find an option and execute a function create with setExecuter
gochoo.help(): Gochoo // add --help option
gochoo.option(option: string, description: string, type: "string" | "number" | "boolean" | "link"): Gochoo // create a option exemple: --version
gochoo.setExecuter(option: string, fn: (this: Gochoo, next: next, value: string | number | boolean) =>void): Gochoo // create a function executable for an option
gochoo.setName(name: string): Gochoo // define script name