tty-aware-progress
[![Build Status](https://travis-ci.org/bkniffler/tty-aware-progress.png?branch=master)](https://travis-ci.org/bkniffler/tty-aware-progress)
Last updated 7 years ago by bkniffler .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tty-aware-progress 
SYNC missed versions from official npm registry.

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);
}

Current Tags

  • 1.0.4                                ...           latest (7 years ago)

5 Versions

  • 1.0.4                                ...           7 years ago
  • 1.0.3                                ...           7 years ago
  • 1.0.2                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |