From 19935d6484811c5e468817f846b7b3d417d7bf4a Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 23 Feb 2015 14:03:03 +0700 Subject: [PATCH] add support for `FORCE_COLOR` environment variable to force color https://github.com/sindresorhus/supports-color/pull/18 --- package.json | 2 +- readme.md | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 613afd1..bb067b8 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "escape-string-regexp": "^1.0.2", "has-ansi": "^1.0.3", "strip-ansi": "^2.0.1", - "supports-color": "^1.2.1" + "supports-color": "^1.3.0" }, "devDependencies": { "matcha": "^0.6.0", diff --git a/readme.md b/readme.md index 1b9a8d8..34878e0 100644 --- a/readme.md +++ b/readme.md @@ -99,11 +99,9 @@ var ctx = new chalk.constructor({enabled: false}); ### 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`. - -Used internally and handled for you, but exposed for convenience. +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`. ### chalk.styles