1.7.3 • Published 5 years ago

working-bar v1.7.3

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Working-Bar

A simple plugin to show some feedback while running processes in the command line

Getting Started

These instructions will show you how to quickly get working-bar setup and displaying in your command line applications

Installing

Add this package to your project

npm install --save working-bar

Using

Instantiate object

let WorkingBar = require('working-bar');
let workingBar = new WorkingBar();

Configure object

workingBar.front = 'Working: [';
workingBar.back = '] Bar';
workingBar.character = '-----';
workingBar.length = 80;

Start process

workingBar.start();

Print a message without stopping display

workingBar.message('Hey there');

Even change attributes while working

workingBar.front = 'New Front: [';
workingBar.back = '] New Back';

Play around with different configurations

workingBar.before = '-';
workingBar.character = '-';
<!-- Or -->
workingBar.empty = '|';
workingBar.character = '----';

Also works with colored strings

Manually or with plugins like Cosmetic

workingBar.character = '\x1b[36m-----\x1b[0m'
workingBar.front = cosmetic.green('Green Front: [');
<!-- Or -->
workingBar.before = '\x1b[36m-'
workingBar.character = '-\x1b[0m'

Set both before and after empty characters at the same time Only one character strings accepted currently

workingBar.empty = '0';

Stop process with an optional message

workingBar.stop('Work complete!');

Default values

workingBar.length = 40;
workingBar.front = '[';
workingBar.before = ' ';
workingBar.character = '-';
workingBar.after = ' ';
workingBar.back = ']';
workingBar.interval = 35; //(milliseconds)

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

1.7.3

5 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago