Convert docs to docsy

This commit is contained in:
Phillip Wittrock
2020-06-07 21:07:46 -07:00
parent 25a38ad2b6
commit 42497c664f
11469 changed files with 816051 additions and 4557 deletions

48
site/node_modules/dir-glob/index.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
'use strict';
const path = require('path');
const arrify = require('arrify');
const pathType = require('path-type');
const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0];
const getPath = filepath => filepath[0] === '!' ? filepath.slice(1) : filepath;
const addExtensions = (file, extensions) => {
if (path.extname(file)) {
return `**/${file}`;
}
return `**/${file}.${getExtensions(extensions)}`;
};
const getGlob = (dir, opts) => {
opts = Object.assign({}, opts);
if (opts.files && !Array.isArray(opts.files)) {
throw new TypeError(`\`options.files\` must be an \`Array\`, not \`${typeof opts.files}\``);
}
if (opts.extensions && !Array.isArray(opts.extensions)) {
throw new TypeError(`\`options.extensions\` must be an \`Array\`, not \`${typeof opts.extensions}\``);
}
if (opts.files && opts.extensions) {
return opts.files.map(x => path.join(dir, addExtensions(x, opts.extensions)));
} else if (opts.files) {
return opts.files.map(x => path.join(dir, `**/${x}`));
} else if (opts.extensions) {
return [path.join(dir, `**/*.${getExtensions(opts.extensions)}`)];
}
return [path.join(dir, '**')];
};
module.exports = (input, opts) => {
return Promise.all(arrify(input).map(x => pathType.dir(getPath(x))
.then(isDir => isDir ? getGlob(x, opts) : x)))
.then(globs => [].concat.apply([], globs));
};
module.exports.sync = (input, opts) => {
const globs = arrify(input).map(x => pathType.dirSync(getPath(x)) ? getGlob(x, opts) : x);
return [].concat.apply([], globs);
};

9
site/node_modules/dir-glob/license generated vendored Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
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.

71
site/node_modules/dir-glob/package.json generated vendored Normal file
View File

@@ -0,0 +1,71 @@
{
"_from": "dir-glob@2.0.0",
"_id": "dir-glob@2.0.0",
"_inBundle": false,
"_integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==",
"_location": "/dir-glob",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "dir-glob@2.0.0",
"name": "dir-glob",
"escapedName": "dir-glob",
"rawSpec": "2.0.0",
"saveSpec": null,
"fetchSpec": "2.0.0"
},
"_requiredBy": [
"/globby"
],
"_resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz",
"_shasum": "0b205d2b6aef98238ca286598a8204d29d0a0034",
"_spec": "dir-glob@2.0.0",
"_where": "/Users/pwittroc/Projects/kpt/site/node_modules/globby",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "github.com/kevva"
},
"bugs": {
"url": "https://github.com/kevva/dir-glob/issues"
},
"bundleDependencies": false,
"dependencies": {
"arrify": "^1.0.1",
"path-type": "^3.0.0"
},
"deprecated": false,
"description": "Convert directories to glob compatible strings",
"devDependencies": {
"ava": "*",
"del": "^3.0.0",
"make-dir": "^1.0.0",
"rimraf": "^2.5.0",
"xo": "*"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"homepage": "https://github.com/kevva/dir-glob#readme",
"keywords": [
"convert",
"directory",
"extensions",
"files",
"glob"
],
"license": "MIT",
"name": "dir-glob",
"repository": {
"type": "git",
"url": "git+https://github.com/kevva/dir-glob.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "2.0.0"
}

74
site/node_modules/dir-glob/readme.md generated vendored Normal file
View File

@@ -0,0 +1,74 @@
# dir-glob [![Build Status](https://travis-ci.org/kevva/dir-glob.svg?branch=master)](https://travis-ci.org/kevva/dir-glob)
> Convert directories to glob compatible strings
## Install
```
$ npm install dir-glob
```
## Usage
```js
const dirGlob = require('dir-glob');
dirGlob(['index.js', 'test.js', 'fixtures']).then(files => {
console.log(files);
//=> ['index.js', 'test.js', 'fixtures/**']
});
dirGlob(['lib/**', 'fixtures'], {
files: ['test', 'unicorn']
extensions: ['js']
}).then(files => {
console.log(files);
//=> ['lib/**', 'fixtures/**/test.js', 'fixtures/**/unicorn.js']
});
dirGlob(['lib/**', 'fixtures'], {
files: ['test', 'unicorn', '*.jsx'],
extensions: ['js', 'png']
}).then(files => {
console.log(files);
//=> ['lib/**', 'fixtures/**/test.{js,png}', 'fixtures/**/unicorn.{js,png}', 'fixtures/**/*.jsx']
});
```
## API
### dirGlob(input, [options])
Returns a `Promise` for an array of glob strings.
### dirGlob.sync(input, [options])
Returns an array of glob strings.
#### input
Type: `Array` `string`
A `string` or an `Array` of paths.
#### options
##### extensions
Type: `Array`
Append extensions to the end of your globs.
##### files
Type: `Array`
Only glob for certain files.
## License
MIT © [Kevin Mårtensson](https://github.com/kevva)