Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/siddharthkp/prettycli

Pretty print messages on the terminal
https://github.com/siddharthkp/prettycli

messages node pretty terminal

Last synced: 23 days ago
JSON representation

Pretty print messages on the terminal

Awesome Lists containing this project

README

        






Pretty print messages on the terminal



#### Usage

```js

// Require what you need from prettycli

const {info, warn} = require('prettycli');

/*

There are 6 functions:

Print to stdout:
1. info: (label, message)
2. loading: (label, message)
3. warn: (message)
4. error: (message)

Returns pretty string (does not print)
5. command: (command)
6. link: (url)

*/

if (!process.env.PRODUCTION) info('BUILD', 'Running dev stuff');
else warn('This is production mode! Are you sure?');

```

 

#### license

MIT © [siddharthkp](https://github.com/siddharthkp)