spray-print
Colorized print
spray-print is a library that makes your console prints more vibrant using chalk.
Installation
Once you've added spray print to your project, you have to require it in your file.
Usage
There are several types of printouts, and a custom one too:
There is also an alternate styling choice that uses (!)
instead of [!]
:
Anything that works with console.log
works here, so you can still display variables and join strings.
Standard Print
A standard print is signified by a blue !
character inside brackets.
Warning Print
A standard print is signified by a yellow !
character inside brackets.
Error Print
A standard print is signified by a red !
character inside brackets. It's advised you use this over console.error
in nodejs commandline apps, as it stands out more.
Success Print
A standard print is signified by a green !
character inside brackets. Should be used to show that a task completed successfully.
Custom Print
A standard print is signified by blue text inside brackets. This text is derived from the first given argument, while the second is the content.
On version 1.0.0, using this command will throw an error.
Links
https://www.npmjs.com/package/spray-print - NPM Page
Last updated
Was this helpful?