Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 962 Bytes

README.md

File metadata and controls

53 lines (39 loc) · 962 Bytes

Status

Command-line status update system

Usage

// A new manager. Nothing happens yet.
const cm = new StatusManager();
// Start the status area, though still nothing is printed
cm.start()
// Update items by keys that you invent.  As you add unique ones, they are added
// and console space is allocated without overwriting existing console messages.
cm.update(2, "my status")
// Logging still works -- gets "prepended" before the status area
console.log("This doesn't overwrite anything.")
// Adjust how often the screen refreshes (status updates are batched)
cm.screenRefreshRateMs = 250
// Stop the status area; subsequent logging goes under it
cm.stop()

Development

Build:

npm run build

Unit tests:

npm run test

Unit tests, refreshed live:

npm run watch

Prepare for release (e.g. run tests and bump version number):

npm run release

Publish to npm:

npm publish