cli-alert-msg
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

/cli-alert-msg/

    Package Sidebar

    Install

    npm i cli-alert-msg

    Weekly Downloads

    6

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.14 kB

    Total Files

    4

    Last publish

    Collaborators

    • csalam07