Terminal task list
$ npm install --save listr
const execa = require('execa'); const Listr = require('listr'); const tasks = new Listr([ { message: 'Install package dependencies', task: () => execa('npm', ['install']) }, { message: 'Run tests', task: () => execa('npm', ['test']) }, { message: 'Publish package', task: () => execa('npm', ['publish']) } ]); tasks.run().catch(err => { console.error(err); });
Type: object[]
List of tasks.
Type: string
Message of the task.
Type: Function
Task function.
Type: object[]
Task object.
Start executing the tasks.
MIT ©Sam Verschueren