Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "cli-color", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Colors and formatting for the console", | ||
@@ -5,0 +5,0 @@ "keywords": ["ansi", "color", "console", "terminal", "cli", "shell", "log", "logging", "xterm"], |
# cli-color - Yet another console color package. | ||
What's wrong with the others ? | ||
Awesome ones mess with built-ins, less awesome seem too verbose in use. This one aims to be both safe and neat. | ||
Colors and formatting for the console. This package won't mess with built-ins and provides neat way to predefine color patterns, see below. | ||
@@ -14,21 +13,21 @@ ## Installation | ||
var ccolor = require('cli-color'); | ||
var clc = require('cli-color'); | ||
Output colored text: | ||
color.log(ccolor.red('Text in red')); | ||
console.log(clc.red('Text in red')); | ||
Styles can be mixed: | ||
color.log(ccolor.red.bgWhite.underline('Underlined red text on white background.')); | ||
console.log(clc.red.bgWhite.underline('Underlined red text on white background.')); | ||
Styled text can be mixed with unstyled: | ||
ccolor.log(ccolor.red('red') + ' plain ' + ccolor.blue('blue')); | ||
console.log(clc.red('red') + ' plain ' + clc.blue('blue')); | ||
Best way is to preset needed stylings and then use it: | ||
__Best way is to predefine needed stylings and then use it__: | ||
var error = ccolor.red.bold; | ||
var warn = ccolor.yellow; | ||
var notice = ccolor.blue; | ||
var error = clc.red.bold; | ||
var warn = clc.yellow; | ||
var notice = clc.blue; | ||
@@ -35,0 +34,0 @@ console.log(error('Error!')); |
8108
8
71