cli-alert
v1.0.3
Published
Cross platform CLI Alerts with colors & colored symboled for success, info, warning, error. Works on macOS, Linux, and Windows
Downloads
23
Maintainers
Readme
cli-alerts
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
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