Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linespin

Simple progress output

Extracted from music.json

Why?

It's nice to know that your program is running and not dead with a simple spinner animation

Usage

  $ npm install linespin
  // linespin_example.js

  var Linespin = require('./linespin');

  // Create new instance of linespin
  var linespin = new Linespin('Spinning...', 'All done!', 100);

  // Start spinner at beginning of task
  linespin.start();


  // Some long running task...
  linespin.error('Error!');

  // Continuing process...
  linespin.warn('Warning!');

  // Stop at the end of task
  linespin.stop();
  $ node linespin_example.js
    [/] Spinning...

  # During process...

  $ node linespin_example.js
    [!] Warning!        # red
    [!] Error!          # Yellow
    [-] Spinning...     # Blue

  # On finish

  $ node linespin_example.js
    [✓] All done!       # Green

Notes

  • Assumes your progress does not print to console/stdout as the spinner works by replacing the same line over and over again to produce the animation
  • Add editable color options
  • Need to add Gruntfile

License

Linespin is released under the MIT License.

About

Simple progress output

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages