# @hjvedvik/tasks

> Terminal task list

Latest version **0.0.8** (published 2018-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hjvedvik/tasks
pnpm add @hjvedvik/tasks
yarn add @hjvedvik/tasks
bun add @hjvedvik/tasks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2018-09-17 |
| First published | 2018-08-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 6 |
| Unpacked size | 836.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 26 |
| Author | Hans-Jørgen Vedvik |
| Maintainers | hjvedvik |
| Keywords | task, list, progress, terminal |

## Links

- npm: https://www.npmjs.com/package/@hjvedvik/tasks
- Repository: https://github.com/hjvedvik/tasks
- Homepage: https://github.com/hjvedvik/tasks#readme
- Issues: https://github.com/hjvedvik/tasks/issues
- npm.io page: https://npm.io/package/@hjvedvik/tasks

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [p-map](https://npm.io/package/p-map.md) ^1.2.0
- [figures](https://npm.io/package/figures.md) ^2.0.0
- [hirestime](https://npm.io/package/hirestime.md) ^3.2.1
- [dateformat](https://npm.io/package/dateformat.md) ^3.0.3
- [log-update](https://npm.io/package/log-update.md) ^2.3.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2018-09-17
- 0.0.7 — 2018-08-07
- 0.0.6 — 2018-08-07
- 0.0.5 — 2018-08-07
- 0.0.4 — 2018-08-07
- 0.0.3 — 2018-08-07
- 0.0.2 — 2018-08-06
- 0.0.1 — 2018-08-06

## README

# @hjvedvik/tasks

> This package shares many similarities with [listr](https://github.com/SamVerschueren/listr), but is more suited for synchronous code.

<pre>
  <p align="center">
    <img width="450" src="https://cdn.rawgit.com/hjvedvik/tasks/8305521/art/terminal.svg">
  </p>
</pre>

## Install

```sh
npm install @hjvedvik/tasks
```

## Usage

```js
const Tasks = require('@hjvedvik/tasks')

const tasks = new Tasks([
  {
    title: 'Simple task',
    task: (context, task) => {
      // task.setProgress(1, 5)
      // task.setStatus('')
      // task.setSummary('')
      // task.fail('')
    }
  },
  {
    title: 'Sub tasks',
    skip: () => true, // true, false, string
    task: () => new Tasks([
      {
        title: 'Another task',
        task: () => {
          // task.setProgress(1, 10)
        }
      }
    ])
  }
])

tasks.run({
  // context
})
```

## Roadmap for v1.0

- [x] Render in TTY and non-TTY environments
- [ ] Determine a stable API
- [ ] Create tests

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