Initial commit

This commit is contained in:
Patrick Marsceill
2017-03-09 13:16:08 -05:00
commit b7b0d0d7bf
4147 changed files with 401224 additions and 0 deletions

88
node_modules/globby/index.js generated vendored Normal file
View File

@@ -0,0 +1,88 @@
'use strict';
var Promise = require('pinkie-promise');
var arrayUnion = require('array-union');
var objectAssign = require('object-assign');
var glob = require('glob');
var pify = require('pify');
var globP = pify(glob, Promise).bind(glob);
function isNegative(pattern) {
return pattern[0] === '!';
}
function isString(value) {
return typeof value === 'string';
}
function assertPatternsInput(patterns) {
if (!patterns.every(isString)) {
throw new TypeError('patterns must be a string or an array of strings');
}
}
function generateGlobTasks(patterns, opts) {
patterns = [].concat(patterns);
assertPatternsInput(patterns);
var globTasks = [];
opts = objectAssign({
cache: Object.create(null),
statCache: Object.create(null),
realpathCache: Object.create(null),
symlinks: Object.create(null),
ignore: []
}, opts);
patterns.forEach(function (pattern, i) {
if (isNegative(pattern)) {
return;
}
var ignore = patterns.slice(i).filter(isNegative).map(function (pattern) {
return pattern.slice(1);
});
globTasks.push({
pattern: pattern,
opts: objectAssign({}, opts, {
ignore: opts.ignore.concat(ignore)
})
});
});
return globTasks;
}
module.exports = function (patterns, opts) {
var globTasks;
try {
globTasks = generateGlobTasks(patterns, opts);
} catch (err) {
return Promise.reject(err);
}
return Promise.all(globTasks.map(function (task) {
return globP(task.pattern, task.opts);
})).then(function (paths) {
return arrayUnion.apply(null, paths);
});
};
module.exports.sync = function (patterns, opts) {
var globTasks = generateGlobTasks(patterns, opts);
return globTasks.reduce(function (matches, task) {
return arrayUnion(matches, glob.sync(task.pattern, task.opts));
}, []);
};
module.exports.generateGlobTasks = generateGlobTasks;
module.exports.hasMagic = function (patterns, opts) {
return [].concat(patterns).some(function (pattern) {
return glob.hasMagic(pattern, opts);
});
};

21
node_modules/globby/license generated vendored Normal file
View 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.

136
node_modules/globby/package.json generated vendored Normal file
View File

@@ -0,0 +1,136 @@
{
"_args": [
[
"globby@^6.0.0",
"/Users/pmarsceill/_projects/just-the-docs/node_modules/stylelint"
]
],
"_from": "globby@>=6.0.0 <7.0.0",
"_id": "globby@6.1.0",
"_inCache": true,
"_installable": true,
"_location": "/globby",
"_nodeVersion": "4.6.1",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/globby-6.1.0.tgz_1478246824721_0.12834556330926716"
},
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"name": "globby",
"raw": "globby@^6.0.0",
"rawSpec": "^6.0.0",
"scope": null,
"spec": ">=6.0.0 <7.0.0",
"type": "range"
},
"_requiredBy": [
"/stylelint"
],
"_resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
"_shasum": "f5a6d70e8395e21c858fb0489d64df02424d506c",
"_shrinkwrap": null,
"_spec": "globby@^6.0.0",
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/stylelint",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/globby/issues"
},
"dependencies": {
"array-union": "^1.0.1",
"glob": "^7.0.3",
"object-assign": "^4.0.1",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0"
},
"description": "Extends `glob` with support for multiple patterns and exposes a Promise API",
"devDependencies": {
"ava": "*",
"glob-stream": "github:gulpjs/glob-stream#master",
"globby": "github:sindresorhus/globby#master",
"matcha": "^0.7.0",
"rimraf": "^2.2.8",
"xo": "^0.16.0"
},
"directories": {},
"dist": {
"shasum": "f5a6d70e8395e21c858fb0489d64df02424d506c",
"tarball": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "5c647384e349e90a13658778029b96b28112a972",
"homepage": "https://github.com/sindresorhus/globby#readme",
"keywords": [
"all",
"array",
"directories",
"dirs",
"expand",
"files",
"filesystem",
"filter",
"find",
"fnmatch",
"folders",
"fs",
"glob",
"globbing",
"globs",
"gulpfriendly",
"match",
"matcher",
"minimatch",
"multi",
"multiple",
"paths",
"pattern",
"patterns",
"promise",
"traverse",
"util",
"utility",
"wildcard",
"wildcards"
],
"license": "MIT",
"maintainers": [
{
"name": "schnittstabil",
"email": "michael@schnittstabil.de"
},
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
{
"name": "ult_combo",
"email": "ultcombo@gmail.com"
}
],
"name": "globby",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/globby.git"
},
"scripts": {
"bench": "npm update glob-stream && matcha bench.js",
"test": "xo && ava"
},
"version": "6.1.0"
}

88
node_modules/globby/readme.md generated vendored Normal file
View File

@@ -0,0 +1,88 @@
# globby [![Build Status](https://travis-ci.org/sindresorhus/globby.svg?branch=master)](https://travis-ci.org/sindresorhus/globby)
> Extends [glob](https://github.com/isaacs/node-glob) with support for multiple patterns and exposes a Promise API
## Install
```
$ npm install --save globby
```
## Usage
```
├── unicorn
├── cake
└── rainbow
```
```js
const globby = require('globby');
globby(['*', '!cake']).then(paths => {
console.log(paths);
//=> ['unicorn', 'rainbow']
});
```
## API
### globby(patterns, [options])
Returns a Promise for an array of matching paths.
### globby.sync(patterns, [options])
Returns an array of matching paths.
### globby.generateGlobTasks(patterns, [options])
Returns an array of objects in the format `{ pattern: string, opts: Object }`, which can be passed as arguments to [`node-glob`](https://github.com/isaacs/node-glob). This is useful for other globbing-related packages.
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration.
### globby.hasMagic(patterns, [options])
Returns a `boolean` of whether there are any special glob characters in the `patterns`.
Note that the options affect the results. If `noext: true` is set, then `+(a|b)` will not be considered a magic pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`, then that is considered magical, unless `nobrace: true` is set.
#### patterns
Type: `string` `Array`
See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage).
#### options
Type: `Object`
See the `node-glob` [options](https://github.com/isaacs/node-glob#options).
## Globbing patterns
Just a quick overview.
- `*` matches any number of characters, but not `/`
- `?` matches a single character, but not `/`
- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part
- `{}` allows for a comma-separated list of "or" expressions
- `!` at the beginning of a pattern will negate the match
[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/master/test.js)
## Related
- [multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem
- [glob-stream](https://github.com/wearefractal/glob-stream) - Streaming alternative
- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)