Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added some documentation

  • Loading branch information...
commit 488987757d64249915e4909abd0a1912bd9ec164 1 parent a87d713
@mattpat authored
Showing with 20 additions and 1 deletion.
  1. +20 −1 README.md
View
21 README.md
@@ -10,4 +10,23 @@ You can also nest colorizations:
#bold[Welcome to the #green[Green Machine] tool!]
-Currently colorize supports the standard set of 8 ANSI colors (black, red, green, yellow, blue, magenta, cyan, white), along with bold, italic, underline, blink, and a special "reset" keyword.
+Currently colorize supports the standard set of 8 ANSI colors (black, red, green, yellow, blue, magenta, cyan, white), along with bold, italic, underline, blink, and a special "reset" keyword.
+
+Usage
+-----
+To use colorize, install it somewhere local and use:
+
+ var colorize = require('./colorize');
+
+Or install it using [npm](http://npmjs.org) and use:
+
+ var colorize = require('colorize');
+
+You then use `.ansify` to get a colorized string:
+
+ var myStr = colorize.ansify('This word is #blue[blue].');
+
+Alternatively, you can use colorize's alias to the console to output strings directly:
+
+ var cconsole = colorize.console;
+ cconsole.log('A world of #magenta[pretty colors]!');
Please sign in to comment.
Something went wrong with that request. Please try again.