cli-utils
Collection of utils to build CLI Node based applications.
Features
Installation
With NPM:
$ npm install @njakob/cli-utils
With Yarn:
$ yarn add @njakob/cli-utils
Usage
Console Reporter
import { ConsoleReporter } from '@njakob/cli-utils';
const reporter = new ConsoleReporter();
reporter.log(reporter.parse`Something to ${reporter.styles.red`log`}`, 2);
reporter.error(reporter.parse`${reporter.styles.red`Error`}: Something went wrong`);
reporter.success(reporter.parse`Something was a success`);
reporter.warning(reporter.parse`Something went not too good`);
reporter.failure(reporter.parse`Something went totally wrong`);
Related Projects
rainbow
: String styling helpers inspired by Chalk.
Licences
njakob/cli-utils
is licensed under the MIT License.