Skip to content

tkoriginal/cli-alert

Repository files navigation

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

About

Cross platform CLI Alerts with colors & colored symboled for success, info, warning, error. Works on macOS, Linux, and Windows

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published