add support for FORCE_COLOR environment variable to force color
https://github.com/sindresorhus/supports-color/pull/18
This commit is contained in:
parent
e520cec3e1
commit
19935d6484
2 changed files with 3 additions and 5 deletions
|
|
@ -44,7 +44,7 @@
|
||||||
"escape-string-regexp": "^1.0.2",
|
"escape-string-regexp": "^1.0.2",
|
||||||
"has-ansi": "^1.0.3",
|
"has-ansi": "^1.0.3",
|
||||||
"strip-ansi": "^2.0.1",
|
"strip-ansi": "^2.0.1",
|
||||||
"supports-color": "^1.2.1"
|
"supports-color": "^1.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"matcha": "^0.6.0",
|
"matcha": "^0.6.0",
|
||||||
|
|
|
||||||
|
|
@ -99,11 +99,9 @@ var ctx = new chalk.constructor({enabled: false});
|
||||||
|
|
||||||
### chalk.supportsColor
|
### chalk.supportsColor
|
||||||
|
|
||||||
Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color).
|
Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color). Used internally and handled for you, but exposed for convenience.
|
||||||
|
|
||||||
Can be overridden by the user with the flags `--color` and `--no-color`.
|
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
||||||
|
|
||||||
Used internally and handled for you, but exposed for convenience.
|
|
||||||
|
|
||||||
### chalk.styles
|
### chalk.styles
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue