summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color')
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js32
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json97
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md30
3 files changed, 159 insertions, 0 deletions
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js
new file mode 100644
index 0000000000..092d0baef6
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js
@@ -0,0 +1,32 @@
+'use strict';
+module.exports = (function () {
+ if (process.argv.indexOf('--no-color') !== -1) {
+ return false;
+ }
+
+ if (process.argv.indexOf('--color') !== -1) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return false;
+ }
+
+ if (process.platform === 'win32') {
+ return true;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return true;
+ }
+
+ if (process.env.TERM === 'dumb') {
+ return false;
+ }
+
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ return false;
+})();
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json
new file mode 100644
index 0000000000..2e469520b4
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json
@@ -0,0 +1,97 @@
+{
+ "_args": [
+ [
+ "has-color@^0.1.7",
+ "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge"
+ ]
+ ],
+ "_from": "has-color@>=0.1.7 <0.2.0",
+ "_id": "has-color@0.1.7",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/npmlog/gauge/has-color",
+ "_npmUser": {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ },
+ "_npmVersion": "1.4.6",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "has-color",
+ "raw": "has-color@^0.1.7",
+ "rawSpec": "^0.1.7",
+ "scope": null,
+ "spec": ">=0.1.7 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/npmlog/gauge"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
+ "_shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f",
+ "_shrinkwrap": null,
+ "_spec": "has-color@^0.1.7",
+ "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge",
+ "author": {
+ "email": "sindresorhus@gmail.com",
+ "name": "Sindre Sorhus",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/has-color/issues"
+ },
+ "dependencies": {},
+ "description": "Detect whether a terminal supports color",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f",
+ "tarball": "http://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/has-color",
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "capability",
+ "detect"
+ ],
+ "license": "MIT",
+ "maintainers": [
+ {
+ "email": "sindresorhus@gmail.com",
+ "name": "sindresorhus"
+ }
+ ],
+ "name": "has-color",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/sindresorhus/has-color.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "0.1.7"
+}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md
new file mode 100644
index 0000000000..37bbd8991a
--- /dev/null
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md
@@ -0,0 +1,30 @@
+# has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color)
+
+> Detect whether a terminal supports color.
+
+Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk).
+
+
+## Install
+
+```bash
+$ npm install --save has-color
+```
+
+
+## Usage
+
+```js
+var hasColor = require('has-color');
+
+if (hasColor) {
+ console.log('Terminal supports color.');
+}
+```
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+
+## License
+
+[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)