npm.io
0.2.1 • Published 3 years ago

ascii-pipeline

Licence
Apache-2.0
Version
0.2.1
Deps
0
Size
29 kB
Vulns
0
Weekly
0
Stars
2

ascii-pipeline

ascii pipelines made easy

Npm Version Build Status Dependency Status devDependency Status Coverage Status npm npm

Installation

npm install ascii-pipeline --save

Usage

const Pipeline = require('ascii-pipeline');

const pipe = new Pipeline([{
  name: 'starting',
  status: 'SUCCESS',
}, {
  name: 'nested',
  status: 'SUCCESS',
  children: [{
    name: 'child',
    status: 'FAIL'
  }, {
    name: 'child1',
    status: 'SUCCESS'
  },]
},{
  name: 'almost',
  status: 'IN_PROGRESS'
},{
  name: 'ending',
  status: 'UNKNOWN'
}]);

console.log(pipe.toString());

This will output:

 ─ starting ┬ nested ┬  ─ almost ─ ─ ending ─ 
            ├ child  ┤                        
            └ child1 ┘                        

Or the colorized version: