tty-aware-progress

1.0.4 • Public • Published

tty-aware-progress

Build Status

The excellent progress package from npm will unfortunately ignore non-TTY environments like CI (circle-ci, travis, etc). This package uses progress, but in case of non-TTY, the progress will be output as rolling logs.

Install

npm install tty-aware-progress
# or
yarn add tty-aware-progress

Use

tty-aware-progress will only need the total number of expected ticks like shown below. It returns a function that emits progress.

import createProgress from 'tty-aware-progress';

const progress = createProgress(100);
for (var i = 0; i < 100; i++) {
  progress();
}

// OR

const progress = createProgress(100);
for (var i = 0; i < 10; i++) {
  progress(10);
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    19,292
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    19,292
  • 1.0.3
    16,109
  • 1.0.2
    2
  • 1.0.1
    3
  • 1.0.0
    4

Package Sidebar

Install

npm i tty-aware-progress

Weekly Downloads

3,384

Version

1.0.4

License

MIT

Unpacked Size

162 kB

Total Files

11

Last publish

Collaborators

  • bkniffler