@viewdo/dxp-story-cli
Version:
README.md
26 lines (20 loc) • 417 B
JavaScript
class CustomRenderer {
constructor(tasks, options) {
this._tasks = tasks;
this._options = Object.assign({}, options);
}
static get nonTTY() {
return true;
}
render() {
for (const task of this._tasks) {
task.subscribe(event => {
if (event.type === 'STATE' && task.isPending()) {
console.log(`${task.title} [started]`);
}
});
}
}
end(err) { }
}
module.exports = CustomRenderer;