Commit graph

23 commits

Author SHA1 Message Date
Josh
0d2144904b check parent builder object for enabled status (#142) 2017-01-30 04:10:02 -05:00
Martin Heidegger
05f87e25e1 Close #92 PR: Closing before and reopening the style after a line break. 2016-01-17 12:35:27 +01:00
Steve Mao
337f9c7485 add missing tests 2016-01-06 19:06:51 +11:00
vdemedes
04cae226cc remove has-ansi and strip-ansi dependencies 2015-12-12 23:55:01 +01:00
Sindre Sorhus
409f95eef5 add XO
https://github.com/sindresorhus/xo
2015-08-20 03:05:43 +07:00
Joshua Appelman
922ac4b0aa Makes dim when gray a noop on windows terminals.
Fixes #58
2015-07-01 04:11:18 +02:00
Wei Kin Huang
e3272e8449 Close #60 PR: Don't override windows blue when in xterm mode. Fixes #59 2015-04-26 16:00:01 +07:00
David Keijser
72d1c11e43 Close #54 PR: export classy chalk object to create isolated ctx. Fixes #46, Fixes #46 2015-02-17 15:18:18 +07:00
Sindre Sorhus
fc6a9b27dc force blue color to be use bright blue on Windows - fixes #36
as the normal blue color is illegible
2014-12-05 16:27:16 +07:00
Joshua Appelman
0234fe987d Reverses application of styles, now left-to-right
The styles' application order used to to be right-to-left e.g.:
```javascript
console.log(chalk.red.reset.blue('something'))
// red
```

Where now it has been reversed. E.g.:
```javascript
console.log(chalk.red.reset.blue('something'))
// blue
```

It seems to me that this is the more intuitive application order.

Closes #41
2014-08-22 21:28:38 +02:00
Sean McArthur
42918337e5 return a new function for each getter
- defines the getters onto a proto
- the function returned has its __proto__ set to our proto

fixes #32
2014-07-09 10:54:59 -07:00
Sindre Sorhus
90bd6477d6 add .hasColor() method - fixes #23 2014-06-24 21:34:11 +02:00
Sindre Sorhus
763b167349 refactor and extract the RegExp escaping 2014-06-24 17:13:41 +02:00
Joshua Appelman
d16b0ce367 Adds support for nested chalk expressions.
green(a + blue(b) + c) will now look the same as green(a) +
blue(b) + green(c), as expected. In the previous implementation the
output would have been green(a) + blue(b) + c, because the reset code of
the second expression would close all expressions around it as well.

Now this reset code is replaced by a start code of the outer lying
expression, both stopping the inner and re-starting the outer.
2014-06-23 13:25:47 +02:00
Sindre Sorhus
cf7eb2d0c7 various tweaks 2014-06-04 01:47:53 +02:00
Sindre Sorhus
af4983c011 bump strip-ansi 2014-03-26 16:37:06 +01:00
Sindre Sorhus
d30fd3c3bd improve package.json 2013-12-13 20:27:10 +01:00
Sindre Sorhus
492d63916c don't output escape codes if the input is empty 2013-12-08 01:07:21 +01:00
Sindre Sorhus
879defda72 Update to latest ansi-styles 2013-12-08 01:02:35 +01:00
Andrew Kennedy
6bb27b7759 handle the ability to pass in variable arguments (ex.
chalk.green("it's", "over", 9000)). updated readme to show support of
variable arguments.
2013-10-08 11:03:14 -04:00
Sindre Sorhus
38efc4600b Alias grey to gray. Fixes #3 2013-08-29 16:14:18 +02:00
Sindre Sorhus
c323bf0caf Add support for nested styles 2013-08-03 18:47:47 +02:00
Sindre Sorhus
cffc3552b0 init 2013-08-03 02:18:58 +02:00