docs(stderr): revert example change, only notice instead

This commit is contained in:
Pavel Lang 2018-12-28 04:11:14 +01:00
parent 9223dac310
commit 5fd274a799
No known key found for this signature in database
GPG key ID: 623A223A57974B55

View file

@ -55,17 +55,15 @@ $ npm install chalk
## Usage ## Usage
```js ```js
// for stdout: console.log, console.info, console.debug
const chalk = require('chalk'); const chalk = require('chalk');
// for stderr: console.error, console.warn
const cherr = require('chalk/stderr');
console.log(chalk.blue('Hello world!')); console.log(chalk.blue('Hello world!'));
console.error(cherr.red('Oh, colored error!'));
``` ```
Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
For output to ***stderr*** (like `console.error` or `console.warn`) use `require('chalk/stderr')`
```js ```js
const chalk = require('chalk'); const chalk = require('chalk');
const log = console.log; const log = console.log;