Default Renderer

Introduction

Default renderer is the main renderer that is shown in the demo and will only work in TTY environments.

Global Options

rendererOptions

Static rendererOptions: Object

renderer options for the defauult renderer

Type declaration

NameTypeDescription
indentation?numberindentation per level of subtask default 2
clearOutput?booleanclear all the output generated by the renderer when the task finishes its execution default false global global option that can not be temperated with subtasks
showSubtasks?booleanshow the subtasks of the current task default true
collapse?booleancollapse subtasks after current task completes its execution default true
showSkipMessage?booleanshow skip messages or show the original title of the task, this will also disable collapseSkips mode You can disable showing the skip messages, even though you passed in a message by settings this option, if you want to keep the original task title intact. default true
collapseSkips?booleancollapse skip messages into a single message and overwrite the task title default true
suffixSkips?booleansuffix skip messages with [SKIPPED] when in collapseSkips mode default true
showErrorMessage?booleanshows the thrown error message or show the original title of the task, this will also disable collapseErrors mode You can disable showing the error messages, even though you passed in a message by settings this option, if you want to keep the original task title intact. default true
collapseErrors?booleancollapse error messages into a single message and overwrite the task title default true
suffixRetries?booleansuffix retry messages with [RETRY-${COUNT}] when retry is enabled for a task default true
lazy?booleanonly update through triggers from renderhook useful for tests and stuff. this will disable showing spinner and only update the screen if something else has happened in the task worthy to show default false global global option that can not be temperated with subtasks
showTimer?booleanshow duration for all tasks default false global global option that can not be temperated with subtasks
removeEmptyLines?booleanremoves empty lines from the data output default true
formatOutput?"truncate" | "wrap"formats data output depending on your requirements. default 'truncate' global global option that can not be temperated with subtasks

Defined in

src/renderer/default.renderer.ts:20


Per-Task Options

rendererTaskOptions

Static rendererTaskOptions: Object

per task options for the default renderer

Type declaration
NameTypeDescription
bottomBar?number | booleanwrite task output to the bottom bar instead of the gap under the task title itself. useful for a stream of data. default false true only keep 1 line of the latest data outputted by the task. false only keep 1 line of the latest data outputted by the task. number will keep designated data of the latest data outputted by the task.
persistentOutput?booleankeep output after task finishes default false works both for the bottom bar and the default behavior
showTimer?booleanshow the task time if it was successful
Defined in

src/renderer/default.renderer.ts:135


Edit this page on GitHub Updated at Tue, Feb 1, 2022