Skip to main content
Module

x/dax/mod.ts>ProgressBar

Cross platform shell tools for Deno inspired by zx.
Very Popular
Go to Latest
class ProgressBar
Re-export
import { ProgressBar } from "https://deno.land/x/dax@0.24.0/mod.ts";

A progress bar instance created via $.progress(...).

Constructors

new
ProgressBar(onLog: (...data: any[]) => void, opts: ProgressOptions)

Methods

Finish showing the progress bar.

Forces a render to the console.

increment(inc?)

Increments the position of the progress bar.

kind(kind: "raw" | "bytes")

Sets how to format the length values.

length(size: number | undefined)

Sets the total length of the progress bar.

message(message: string | undefined)

Sets the message the progress bar will display after the prefix in white.

noClear(value?)

Whether the progress bar should output a summary when finished.

position(position: number)

Sets the current position of the progress bar.

prefix(prefix: string | undefined)

Sets the prefix message/word, which will be displayed in green.

with<TResult>(action: () => TResult): TResult

Does the provided action and will call .finish() when this is the last .with(...) action that runs.

with<TResult>(action: () => Promise<TResult>): Promise<TResult>