cli-alerts-guillermo

1.0.2 • Public • Published

Cli Alerts

Cross-platform CLI Alerts with colors & colored symbols for success, info, warning, error.

cli-alerts-guillermo

This is a practice package created from the course of Ahmad Awais

Install

npm install cli-alerts-guillermo

Usage

import alert from 'cli-alerts-guillermo';

// Provide the type, msg, and name options.
alert({type: `success`, msg: `Everything finished!`});
// Prints: ✔ SUCCESS Everything finished!

alert({type: `success`, msg: `Everything finished!`, name: `DONE`});
// Prints: ✔ DONE Everything finished!

alert({type: `warning`, msg: `You didn't add something!`});
// Prints: ⚠ WARNING You didn't add something!

alert({type: `info`, msg: `Awais is awesome!`});
// Prints: ℹ INFO is important!

alert({type: `error`, msg: `Something went wrong!`});
// Prints: ✖ ERROR Something went wrong!

API

alert(options)

❯ options

Type: object
Default: {}

You can specify the options below.

❯ type

Type: string
Default: error

❯ msg

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

❯ name

Type: string
Default: '' (Empty string)

Changelog

❯ Read the changelog here →

KEY: 📦 NEW, 👌 IMPROVE, 🐛 FIX, 📖 DOC, 🚀 RELEASE, and 🤖 TEST

License & Conduct

Package Sidebar

Install

npm i cli-alerts-guillermo

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

4.29 kB

Total Files

4

Last publish

Collaborators

  • guillermobrachetta