1.0.0 ā€¢ Published 2 years ago

cli-alerts1 v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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

DOWNLOADS Node.js CLI Learn VSCode Sponsor Follow @MrAhmadAwais on Twitter

cli-alerts

šŸ“Ÿ

Install

npm install cli-alerts

āš™ļø

Usage

const alert = require('cli-alerts');

// 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 Awais is awesome!

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

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

šŸ“ƒ

License & Conduct

šŸ™Œ

Connect

šŸ‘Œ

Sponsor

Me (Ahmad Awais) and my incredible wife (Maedah Batool) are two engineers who fell in love with open source and then with each other. You can read more about me here. If you or your company use any of my projects or like what Iā€™m doing then consider backing me. I'm in this for the long run. An open-source developer advocate.

Ahmad on Twitter

NodeCLI.com ā€” Learn to build Node.js CLI Automation

This repository is part of the NodeCLI.com course.

After building hundreds of developer automation tools used by millions of developers, I am sharing exactly how you can do it yourself with minimum effective effort. Learn to build Node.js & JavaScript based CLI (Command Line Interface) apps. Automate the grunt work, do more in less time, impress your manager, and help the community. ā†’ I'm sharing it all in this online video course. Node CLI Automation without wasting a 1,000 hours ā†’

Node CLI Course

Node CLI

Awais on Twitter