cli-alert

1.0.3 • Public • Published

cli-alert screenshot

cli-alerts

DOWNLOADS Learn VSCode Follow @tkoriginale on Twitter

Cross Platform CLI Alerts


📟

Install

npm install cli-alert

⚙️

Usage

const alert = require('cli-alert')
 
// You can choose between SUCCESS, INFO, WARNING, ERROR
 
alert()
// Prints: ✖  ERROR  You forgot to define all options
 
alert({ type: 'success', msg: 'All Done!', name: 'Great' })
// Prints:  ✔  GREAT  All Done!
 
alert({ type: 'info', msg: 'This is a cool package' })
// Prints:  ℹ  INFO  This is a cool package
 
alert({ type: 'warning', msg: "You didn't add something!" })
// Prints:  ⚠  WARNING  You didn't add something!
 
alert({ type: 'error', msg: 'Something went wrong mate' })
// Prints:  ✖  ERROR  Something went wrong mate

📃

API

alert(options)

❯ options

Type: object
Default: {}

❯ type

Type: string
Default: error

❯ msg

Type: string
Default: You forgot to define all options

❯ name

Type: string
Default: ``

📝

Changelog

❯ Read the changelog here →


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

I use Emoji-log, you should try it and simplify your git commits.


📃

License & Conduct


🙌

  • This readme was build using template and icons from Ahmad Awais

Package Sidebar

Install

npm i cli-alert

Weekly Downloads

7

Version

1.0.3

License

MIT

Unpacked Size

5.62 kB

Total Files

4

Last publish

Collaborators

  • tkoriginal