Listr
listr
Terminal task list.
listr
is one of those cheeky 💄 modules for your CLI apps.
Below is the gist of this module:
listr
accepts an array of tasks, where each task in a object consisting oftitle
(string) andtask
(method).If a task returns, it means the task was completed succesfully.
If a task throws an error, the task failed.
Task can be async by returning a Promise.
Task can be an Observable.
Task can also be a stream, which is in-turn converted to an Observable.
An instance of
listr
hasadd(task)
,task
andrun
methods. (Names are self explanatory?)
Get it: npm install --save listr
Sample usage:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
1 2 3 |
|
GIF FTW!