Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Here without console.log for purity." #128

Closed
Qix- opened this issue Sep 7, 2016 · 1 comment
Closed

"Here without console.log for purity." #128

Qix- opened this issue Sep 7, 2016 · 1 comment

Comments

@Qix-
Copy link
Member

Qix- commented Sep 7, 2016

I think this is what is throwing people off. A large portion of our tickets (and things I see on StackOverflow) are people misunderstanding how to use chalk. I think they expect chalk.red("hello") to output something.

The readme states Here without console.log for purity. which a lot of people miss (even though there's a usage block right above it). It might be worthwhile to just include console.log (or even var log = console.log; log(...)) in there to illustrate that chalk only returns strings with escape sequences, nothing more.

Just a thought.

@sindresorhus
Copy link
Member

Sure. const log = console.log; log(... sounds good to me.

Qix- added a commit that referenced this issue Sep 8, 2016
Added what are essentially `console.log()` calls to the chalk examples.

Closes #128.
sindresorhus pushed a commit that referenced this issue Sep 8, 2016
* Add log statement to chalk examples

Added what are essentially `console.log()` calls to the chalk examples.

Closes #128.

* Update readme.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants