mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Initial commit
This commit is contained in:
2
node_modules/supports-color/browser.js
generated
vendored
Normal file
2
node_modules/supports-color/browser.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
'use strict';
|
||||
module.exports = false;
|
84
node_modules/supports-color/index.js
generated
vendored
Normal file
84
node_modules/supports-color/index.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
var hasFlag = require('has-flag');
|
||||
|
||||
var support = function (level) {
|
||||
if (level === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return {
|
||||
level: level,
|
||||
hasBasic: true,
|
||||
has256: level >= 2,
|
||||
has16m: level >= 3
|
||||
};
|
||||
};
|
||||
|
||||
var supportLevel = (function () {
|
||||
if (hasFlag('no-color') ||
|
||||
hasFlag('no-colors') ||
|
||||
hasFlag('color=false')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hasFlag('color=16m') ||
|
||||
hasFlag('color=full') ||
|
||||
hasFlag('color=truecolor')) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (hasFlag('color=256')) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (hasFlag('color') ||
|
||||
hasFlag('colors') ||
|
||||
hasFlag('color=true') ||
|
||||
hasFlag('color=always')) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (process.stdout && !process.stdout.isTTY) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ('CI' in process.env) {
|
||||
if ('TRAVIS' in process.env || process.env.CI === 'Travis') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ('TEAMCITY_VERSION' in process.env) {
|
||||
return process.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/) === null ? 0 : 1;
|
||||
}
|
||||
|
||||
if (/^(screen|xterm)-256(?:color)?/.test(process.env.TERM)) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ('COLORTERM' in process.env) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (process.env.TERM === 'dumb') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
})();
|
||||
|
||||
if (supportLevel === 0 && 'FORCE_COLOR' in process.env) {
|
||||
supportLevel = 1;
|
||||
}
|
||||
|
||||
module.exports = process && support(supportLevel);
|
21
node_modules/supports-color/license
generated
vendored
Normal file
21
node_modules/supports-color/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
124
node_modules/supports-color/package.json
generated
vendored
Normal file
124
node_modules/supports-color/package.json
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"supports-color@^3.2.3",
|
||||
"/Users/pmarsceill/_projects/just-the-docs/node_modules/postcss"
|
||||
]
|
||||
],
|
||||
"_from": "supports-color@>=3.2.3 <4.0.0",
|
||||
"_id": "supports-color@3.2.3",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/supports-color",
|
||||
"_nodeVersion": "7.2.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/supports-color-3.2.3.tgz_1484526472497_0.7697830176912248"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "i.am.qix@gmail.com",
|
||||
"name": "qix"
|
||||
},
|
||||
"_npmVersion": "3.10.9",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "supports-color",
|
||||
"raw": "supports-color@^3.2.3",
|
||||
"rawSpec": "^3.2.3",
|
||||
"scope": null,
|
||||
"spec": ">=3.2.3 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/postcss"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
|
||||
"_shasum": "65ac0504b3954171d8a64946b2ae3cbb8a5f54f6",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "supports-color@^3.2.3",
|
||||
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/postcss",
|
||||
"author": {
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"name": "Sindre Sorhus",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"browser": "browser.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/supports-color/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"has-flag": "^1.0.0"
|
||||
},
|
||||
"description": "Detect whether a terminal supports color",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"require-uncached": "^1.0.2",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "65ac0504b3954171d8a64946b2ae3cbb8a5f54f6",
|
||||
"tarball": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"files": [
|
||||
"browser.js",
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "c2394c1f77a0f64c4b2d0db33a3df3b841e6fc15",
|
||||
"homepage": "https://github.com/chalk/supports-color#readme",
|
||||
"keywords": [
|
||||
"16m",
|
||||
"256",
|
||||
"ansi",
|
||||
"capability",
|
||||
"cli",
|
||||
"color",
|
||||
"colors",
|
||||
"colour",
|
||||
"command-line",
|
||||
"console",
|
||||
"detect",
|
||||
"million",
|
||||
"rgb",
|
||||
"shell",
|
||||
"styles",
|
||||
"support",
|
||||
"supports",
|
||||
"terminal",
|
||||
"truecolor",
|
||||
"tty",
|
||||
"xterm"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "qix",
|
||||
"email": "i.am.qix@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "supports-color",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/supports-color.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && mocha",
|
||||
"travis": "mocha"
|
||||
},
|
||||
"version": "3.2.3",
|
||||
"xo": {
|
||||
"envs": [
|
||||
"mocha",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
60
node_modules/supports-color/readme.md
generated
vendored
Normal file
60
node_modules/supports-color/readme.md
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# supports-color [](https://travis-ci.org/chalk/supports-color)
|
||||
|
||||
> Detect whether a terminal supports color
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save supports-color
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var supportsColor = require('supports-color');
|
||||
|
||||
if (supportsColor) {
|
||||
console.log('Terminal supports color');
|
||||
}
|
||||
|
||||
if (supportsColor.has256) {
|
||||
console.log('Terminal supports 256 colors');
|
||||
}
|
||||
|
||||
if (supportsColor.has16m) {
|
||||
console.log('Terminal supports 16 million colors (truecolor)');
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
Returns an `object`, or `false` if color is not supported.
|
||||
|
||||
The returned object specifies a level of support for color through a `.level` property and a corresponding flag:
|
||||
|
||||
- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
|
||||
- `.level = 2` and `.has256 = true`: 256 color support
|
||||
- `.level = 3` and `.has16m = true`: 16 million (truecolor) support
|
||||
|
||||
|
||||
## Info
|
||||
|
||||
It obeys the `--color` and `--no-color` CLI flags.
|
||||
|
||||
For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
||||
|
||||
Explicit 256/truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
|
||||
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
Reference in New Issue
Block a user