Options
All
  • Public
  • Public/Protected
  • All
Menu

This is the default renderer which is neither verbose or updating. It provides short output like update renderer, but does not disturb stdin during execution of listr tasks

Hierarchy

  • SimpleRenderer

Implements

Index

Constructors

  • Parameters

    • tasks: Task<any, typeof SimpleRenderer>[]
    • options: { output?: "stdout" | "stderr"; prefixWithTimestamp?: boolean }
      • Optional output?: "stdout" | "stderr"

        choose between process.stdout and process.stderr

        default

        stdout

      • Optional prefixWithTimestamp?: boolean

        if true this will add timestamp at the begin of the rendered line

        example
        [12:33:44] ✔ Do something important
        
        default

        false

    Returns SimpleRenderer

Properties

eventTypeRendererMap: Partial<{ DATA: (t: Task<any, typeof SimpleRenderer>, event: { data: string; type: DATA }) => void; ENABLED: (t: Task<any, typeof SimpleRenderer>, event: { data?: string | boolean; type: TITLE | STATE | ENABLED | SUBTASK }) => void; MESSAGE: (t: Task<any, typeof SimpleRenderer>, event: { data: { duration?: number; error?: string; retry?: { count: number; withError?: any }; rollback?: string; skip?: string }; type: MESSAGE }) => void; STATE: (t: Task<any, typeof SimpleRenderer>, event: { data?: string | boolean; type: TITLE | STATE | ENABLED | SUBTASK }) => void; SUBTASK: (t: Task<any, typeof SimpleRenderer>, event: { data?: string | boolean; type: TITLE | STATE | ENABLED | SUBTASK }) => void; TITLE: (t: Task<any, typeof SimpleRenderer>, event: { data?: string | boolean; type: TITLE | STATE | ENABLED | SUBTASK }) => void }>

Event type renderer map contains functions to process different task events

options: { output?: "stdout" | "stderr"; prefixWithTimestamp?: boolean }

Type declaration

  • Optional output?: "stdout" | "stderr"

    choose between process.stdout and process.stderr

    default

    stdout

  • Optional prefixWithTimestamp?: boolean

    if true this will add timestamp at the begin of the rendered line

    example
    [12:33:44] ✔ Do something important
    
    default

    false

tasks: Task<any, typeof SimpleRenderer>[]
nonTTY: boolean
rendererOptions: { output?: "stdout" | "stderr"; prefixWithTimestamp?: boolean }

Type declaration

  • Optional output?: "stdout" | "stderr"

    choose between process.stdout and process.stderr

    default

    stdout

  • Optional prefixWithTimestamp?: boolean

    if true this will add timestamp at the begin of the rendered line

    example
    [12:33:44] ✔ Do something important
    
    default

    false

rendererTaskOptions: never

Methods

  • end(): void
  • Returns void

  • log(output?: string): void
  • Parameters

    • Optional output: string

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns string

  • now(): Date
  • Returns Date