Console
CLI UI tools for Node.

Usage
const cli = require('@frctl/console');
cli.log('Plain log output');
cli.success('The operation was successful');
cli.warn('You might want to consider this');
cli.error(new Error('An error with a stack'));
cli.debug('This will only show if the DEBUG environment variable is set');
cli.draw.box('This content is in a box');
const spinner = cli.start.spinner();
setTimeout(() => {
spinner.stop();
cli.success('The timeout has finished!');
}, 1000);
Run with the DEBUG
environment variable set to print Error
stacks and .debug()
output to the console, plus prefix output with the provided namespace.
DEBUG=true node myapp.js
Installation
npm i @frctl/console --save
Requirements
@frctl/console
requires Node >= v6.0