cli-alert-msg
v1.0.0
Published
Let you alert for info,success, warnings and erro in cli with colors & symbols
Downloads
31
Maintainers
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
- MIT © cslam07