Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cli-alert-msg

csalam0710MIT1.0.0TypeScript support: included

Let you alert for info,success, warnings and erro in cli with colors & symbols

cli, console, alert, alert-msg, cli-alert-message, alert-message, cli-alert-msg, cli-alert, cli-alert-console, cli-my-console, cli-your-console, cli-all-console, cli alert windows, cli alert macos, cli alert linux, cli alert windows mac linux, csalam, csalam07

readme

cli-alert-msg

Let you Alert with colors & colored symbols for success, info, warning, error in CLI
Work on macOS, Linux, and Windows.


Installation

npm

npm install cli-alert-msg

Yarn

yarn add cli-alert-msg

Usage

import alert = from 'cli-alert-msg';

// Provide the type, msg, and name options.
alert({type: `success`, msg: `Who doesn't like to be a successfull!`});
// Prints: ✔ SUCCESS Who doesn't like to be a successfull!

alert({type: `success`, msg: `Compiled Successfully!`, name: `FINISHED`});
// Prints: ✔ FINISHED Compiled Successfully!

alert({type: `warning`, msg: `I dont like wanings!`});
// Prints: ⚠ WARNING I dont like wanings!

alert({type: `info`, msg: `It's Raining here!`});
// Prints: ℹ INFO It's Raining here!

alert({type: `error`, msg: `No I cant be wrong!`});
// Prints: ✖ ERROR No I cant be wrong!

API

alert(options)

❯ options

Type: object
Default: {}

You can specify the options below.

❯ type

Type: string
Default: error

❯ msg

Type: string
Default: I forgot to define all options. (Error message)

❯ name

Type: string
Default: '' (Empty string)


License