1.0.3 • Published 2 years ago
cli-alerts-arthur v1.0.3
CLI ALERTS
Use this CLI add some Joy and Color to your CLI
Install
npm install cli-alerts-arthur
Usage
const alert = require('cli-alerts-arthur');
// Provide the type, msg and name options
alert({type: 'success', msg: 'Everything finished!', name: 'DONE'});
// prints: ✔ DONE Everything finished!
alert({type: 'info', msg: 'I love your CLI'});
// prints: ℹ INFO I love your CLI
alert({type: 'info', msg: 'Winter is coming', name: 'weather info'});
// prints: ℹ WEATHER INFO Winter is coming
alert({type: 'warning', msg: 'Fuel tank almost empty!'});
// prints: ⚠ WARNING Fuel tank almost empty!
alert({type: 'error', msg: 'You dont have enough credits'});
// prints: ✖ ERROR You dont have enough credits
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: ' '