Skip to content

Documentation / listr2 / DefaultRenderer

Class: DefaultRenderer

The definition of a ListrRenderer.

See

https://listr2.kilic.dev/renderer/renderer.html

Implements

Constructors

new DefaultRenderer()

new DefaultRenderer(tasks, options, events): DefaultRenderer

Parameters

tasks: ListrDefaultRendererTask[]

options: ListrDefaultRendererOptions

events: ListrEventManager

Returns

DefaultRenderer

Defined in

packages/listr2/src/renderer/default/renderer.ts:63

Properties

nonTTY

static nonTTY: boolean = false

designate whether this renderer can work in non-tty environments

Implementation of

ListrRenderer.nonTTY

Defined in

packages/listr2/src/renderer/default/renderer.ts:22


rendererOptions

static rendererOptions: ListrDefaultRendererOptions

designate renderer global options that is specific to the current renderer

Implementation of

ListrRenderer.rendererOptions

Defined in

packages/listr2/src/renderer/default/renderer.ts:23


rendererTaskOptions

static rendererTaskOptions: ListrDefaultRendererTaskOptions

designate renderer per task options that is specific to the current renderer

Implementation of

ListrRenderer.rendererTaskOptions

Defined in

packages/listr2/src/renderer/default/renderer.ts:42

Methods

render()

render(): Promise<void>

A function to what to do on render

Returns

Promise<void>

Implementation of

ListrRenderer.render

Defined in

packages/listr2/src/renderer/default/renderer.ts:88


update()

update(): void

Returns

void

Defined in

packages/listr2/src/renderer/default/renderer.ts:111


end()

end(): void

A function to what to do on end of the render

Returns

void

Implementation of

ListrRenderer.end

Defined in

packages/listr2/src/renderer/default/renderer.ts:115


create()

create(options?): string

Parameters

options?

options.tasks?: boolean

options.bottomBar?: boolean

options.prompt?: boolean

Returns

string

Defined in

packages/listr2/src/renderer/default/renderer.ts:130


style()

protected style(task, output): string

Parameters

task: ListrDefaultRendererTask

output: boolean = false

Returns

string

Defined in

packages/listr2/src/renderer/default/renderer.ts:168


format()

protected format(message, icon, level): string[]

Parameters

message: string

icon: string

level: number

Returns

string[]

Defined in

packages/listr2/src/renderer/default/renderer.ts:216


shouldOutputToOutputBar()

protected shouldOutputToOutputBar(task): boolean

Parameters

task: ListrDefaultRendererTask

Returns

boolean

Defined in

packages/listr2/src/renderer/default/renderer.ts:257


shouldOutputToBottomBar()

protected shouldOutputToBottomBar(task): boolean

Parameters

task: ListrDefaultRendererTask

Returns

boolean

Defined in

packages/listr2/src/renderer/default/renderer.ts:263