Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dax/src/console/progress/mod.ts>ProgressBar

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

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

Constructors

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

Methods

finish(): void

Finish showing the progress bar.

forceRender(): void

Forces a render to the console.

increment(inc?): this

Increments the position of the progress bar.

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

Sets how to format the length values.

length(size: number | undefined): this

Sets the total length of the progress bar.

message(message: string | undefined): this

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

noClear(value?): this

Whether the progress bar should output a summary when finished.

position(position: number): this

Sets the current position of the progress bar.

prefix(prefix: string | undefined): this

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>