npm.io
0.1.0 • Published 5 years ago

listr-better-renderer

Licence
MIT
Version
0.1.0
Deps
8
Size
13 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Listr update renderer

Install

$ npm install --save listr-better-renderer

Usage

const BetterRenderer = require('listr-better-renderer');
const Listr = require('listr');

const list = new Listr(
	[
		{
			title: 'foo',
			task: () => Promise.resolve('bar'),
		},
	],
	{
		renderer: BetterRenderer,
		collapse: false,
	},
);

list.run();

Note: This is the default renderer for Listr and doesn't need to be specified.

Options

These options should be provided in the Listr options object.

showSubtasks

Type: boolean
Default: true

Set to false if you want to disable the rendering of the subtasks. Subtasks will be rendered if an error occurred in one of them.

collapse

Type: boolean
Default: true

Set to false if you don't want subtasks to be hidden after the main task succeed.

clearOutput

Type: boolean
Default: false

Clear the output when all the tasks are executed succesfully.

showTiming

Type: boolean
Default: false

Set to true if you want tasks to display how long they took (or are taking) to run.

showMultiline

Type: boolean
Default: false

Set to true if you want the output of streams and other tasks to persist, i.e. all lines of output will be shown instead of 1

License

MIT Andrew Henry

Keywords