parent
b0addb86d6
commit
13a555ede8
1 changed files with 9 additions and 1 deletions
10
readme.md
10
readme.md
|
|
@ -49,7 +49,7 @@ console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );
|
||||||
console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );
|
console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );
|
||||||
```
|
```
|
||||||
|
|
||||||
You can easily define your own themes.
|
Easily define your own themes.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var chalk = require('chalk');
|
var chalk = require('chalk');
|
||||||
|
|
@ -57,6 +57,14 @@ var error = chalk.bold.red;
|
||||||
console.log(error('Error!'));
|
console.log(error('Error!'));
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).
|
||||||
|
|
||||||
|
```js
|
||||||
|
var name = 'Sindre';
|
||||||
|
console.log(chalk.green('Hello %s'), name);
|
||||||
|
//=> Hello Sindre
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue