# listr-better-renderer

> A feature packed renderer that is much better than most of the renderers available for listr and listr2 today

Latest version **0.1.0** (published 2020-08-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install listr-better-renderer
pnpm add listr-better-renderer
yarn add listr-better-renderer
bun add listr-better-renderer
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2020-08-11 |
| First published | 2020-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 8 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrew Henry |
| Maintainers | ajhenry |
| Keywords | listr, update, renderer, ora, logupdate, rendering |

## Links

- npm: https://www.npmjs.com/package/listr-better-renderer
- Repository: https://github.com/AJHenry/listr-better-renderer
- Homepage: https://github.com/AJHenry/listr-better-renderer#readme
- Issues: https://github.com/AJHenry/listr-better-renderer/issues
- npm.io page: https://npm.io/package/listr-better-renderer

## Dependencies (8)

- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [figures](https://npm.io/package/figures.md) ^2.0.0
- [log-update](https://npm.io/package/log-update.md) ^2.3.0
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^3.0.1
- [log-symbols](https://npm.io/package/log-symbols.md) ^1.0.2
- [cli-truncate](https://npm.io/package/cli-truncate.md) ^0.2.1
- [indent-string](https://npm.io/package/indent-string.md) ^3.0.0
- [elegant-spinner](https://npm.io/package/elegant-spinner.md) ^1.0.1

## Recent versions

- 0.1.0 (latest) — 2020-08-11

## README

> [Listr](https://github.com/SamVerschueren/listr) update renderer

<img src="screenshot.gif" />

## Install

```
$ npm install --save listr-better-renderer
```

## Usage

```js
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](https://github.com/SamVerschueren/listr) and doesn't need to be specified.

## Options

These options should be provided in the [Listr](https://github.com/SamVerschueren/listr) options object.

### showSubtasks

Type: `boolean`<br>
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`<br>
Default: `true`

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

### clearOutput

Type: `boolean`<br>
Default: `false`

Clear the output when all the tasks are executed succesfully.

### showTiming

Type: `boolean`<br>
Default: `false`

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

### showMultiline

Type: `boolean`<br>
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

## Related

- [listr](https://github.com/SamVerschueren/listr) - Terminal task list
- [listr-verbose-renderer](https://github.com/SamVerschueren/listr-verbose-renderer) - Listr verbose renderer
- [listr-update-renderer](https://github.com/SamVerschueren/listr-update-renderer) - The Original renderer
- [listr-silent-renderer](https://github.com/SamVerschueren/listr-silent-renderer) - Suppress Listr rendering output

## License

MIT © [Andrew Henry](https://github.com/AJHenry)

---
_Source: https://npm.io/package/listr-better-renderer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
