Reference · Streams, draws and seeds
runClifunction
Run the command line. See tane --help for what it takes. One seed serves
the whole run, so the same command prints the same lines on every machine.
Import it
import { runCli } from "@johnmorrisdotca/tane";
Definition
function runCli(args: readonly string[], around?: CliSurroundings): CliResult
Parameters
| Name | Type | Description |
|---|---|---|
args | readonly string[] | Arguments after the command name. |
around (optional) | CliSurroundings | Host environment, locale, clock, input and random source. |
Returns
CliResult
The exit code and text for standard output and standard error.
Examples
import { runCli } from "@johnmorrisdotca/tane";
console.log(runCli(["--help"], { colour: false }).code);0What it prints (run when this page was built)