mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Initial commit
This commit is contained in:
10
node_modules/has-flag/index.js
generated
vendored
Normal file
10
node_modules/has-flag/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
module.exports = function (flag, argv) {
|
||||
argv = argv || process.argv;
|
||||
|
||||
var terminatorPos = argv.indexOf('--');
|
||||
var prefix = /^--/.test(flag) ? '' : '--';
|
||||
var pos = argv.indexOf(prefix + flag);
|
||||
|
||||
return pos !== -1 && (terminatorPos !== -1 ? pos < terminatorPos : true);
|
||||
};
|
21
node_modules/has-flag/license
generated
vendored
Normal file
21
node_modules/has-flag/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.
|
110
node_modules/has-flag/package.json
generated
vendored
Normal file
110
node_modules/has-flag/package.json
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"has-flag@^1.0.0",
|
||||
"/Users/pmarsceill/_projects/just-the-docs/node_modules/supports-color"
|
||||
]
|
||||
],
|
||||
"_from": "has-flag@>=1.0.0 <2.0.0",
|
||||
"_id": "has-flag@1.0.0",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/has-flag",
|
||||
"_nodeVersion": "0.12.5",
|
||||
"_npmUser": {
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"name": "sindresorhus"
|
||||
},
|
||||
"_npmVersion": "2.11.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "has-flag",
|
||||
"raw": "has-flag@^1.0.0",
|
||||
"rawSpec": "^1.0.0",
|
||||
"scope": null,
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/supports-color"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
|
||||
"_shasum": "9d9e793165ce017a00f00418c43f942a7b1d11fa",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "has-flag@^1.0.0",
|
||||
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/supports-color",
|
||||
"author": {
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"name": "Sindre Sorhus",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/has-flag/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Check if argv has a specific flag",
|
||||
"devDependencies": {
|
||||
"ava": "0.0.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9d9e793165ce017a00f00418c43f942a7b1d11fa",
|
||||
"tarball": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "621de2782d538f28f99f0bb85b158799cb3ae5cf",
|
||||
"homepage": "https://github.com/sindresorhus/has-flag#readme",
|
||||
"keywords": [
|
||||
"arg",
|
||||
"args",
|
||||
"argument",
|
||||
"arguments",
|
||||
"argv",
|
||||
"check",
|
||||
"cli",
|
||||
"command-line",
|
||||
"contains",
|
||||
"detect",
|
||||
"find",
|
||||
"flag",
|
||||
"getopt",
|
||||
"has",
|
||||
"minimist",
|
||||
"optimist",
|
||||
"process"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
},
|
||||
{
|
||||
"name": "JD Ballard",
|
||||
"email": "i.am.qix@gmail.com",
|
||||
"url": "github.com/qix-"
|
||||
}
|
||||
],
|
||||
"name": "has-flag",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/has-flag.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
64
node_modules/has-flag/readme.md
generated
vendored
Normal file
64
node_modules/has-flag/readme.md
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
# has-flag [](https://travis-ci.org/sindresorhus/has-flag)
|
||||
|
||||
> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
|
||||
|
||||
Correctly stops looking after an `--` argument terminator.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save has-flag
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
var hasFlag = require('has-flag');
|
||||
|
||||
hasFlag('unicorn');
|
||||
//=> true
|
||||
|
||||
hasFlag('--unicorn');
|
||||
//=> true
|
||||
|
||||
hasFlag('foo=bar');
|
||||
//=> true
|
||||
|
||||
hasFlag('foo');
|
||||
//=> false
|
||||
|
||||
hasFlag('rainbow');
|
||||
//=> false
|
||||
```
|
||||
|
||||
```
|
||||
$ node foo.js --unicorn --foo=bar -- --rainbow
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### hasFlag(flag, [argv])
|
||||
|
||||
Returns a boolean whether the flag exists.
|
||||
|
||||
#### flag
|
||||
|
||||
Type: `string`
|
||||
|
||||
CLI flag to look for. The `--` prefix is optional.
|
||||
|
||||
#### argv
|
||||
|
||||
Type: `array`
|
||||
Default: `process.argv`
|
||||
|
||||
CLI arguments.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
Reference in New Issue
Block a user