progress on migrating to heex templates and font-icons
This commit is contained in:
parent
d43daafdb7
commit
3eff955672
21793 changed files with 2161968 additions and 16895 deletions
assets_old/node_modules/micromatch
108
assets_old/node_modules/micromatch/CHANGELOG.md
generated
vendored
Normal file
108
assets_old/node_modules/micromatch/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
# Release history
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
<details>
|
||||
<summary><strong>Guiding Principles</strong></summary>
|
||||
|
||||
- Changelogs are for humans, not machines.
|
||||
- There should be an entry for every single version.
|
||||
- The same types of changes should be grouped.
|
||||
- Versions and sections should be linkable.
|
||||
- The latest version comes first.
|
||||
- The release date of each versions is displayed.
|
||||
- Mention whether you follow Semantic Versioning.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Types of changes</strong></summary>
|
||||
|
||||
Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
|
||||
|
||||
- `Added` for new features.
|
||||
- `Changed` for changes in existing functionality.
|
||||
- `Deprecated` for soon-to-be removed features.
|
||||
- `Removed` for now removed features.
|
||||
- `Fixed` for any bug fixes.
|
||||
- `Security` in case of vulnerabilities.
|
||||
|
||||
</details>
|
||||
|
||||
## [4.0.0] - 2019-03-20
|
||||
|
||||
### Added
|
||||
|
||||
- Adds support for `options.onMatch`. See the readme for details
|
||||
- Adds support for `options.onIgnore`. See the readme for details
|
||||
- Adds support for `options.onResult`. See the readme for details
|
||||
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Removed support for passing an array of brace patterns to `micromatch.braces()`.
|
||||
- To strictly enforce closing brackets (for `{`, `[`, and `(`), you must now use `strictBrackets=true` instead of `strictErrors`.
|
||||
- `cache` - caching and all related options and methods have been removed
|
||||
- `options.unixify` was renamed to `options.windows`
|
||||
- `options.nodupes` Was removed. Duplicates are always removed by default. You can override this with custom behavior by using the `onMatch`, `onResult` and `onIgnore` functions.
|
||||
- `options.snapdragon` was removed, as snapdragon is no longer used.
|
||||
- `options.sourcemap` was removed, as snapdragon is no longer used, which provided sourcemap support.
|
||||
|
||||
## [3.0.0] - 2017-04-11
|
||||
|
||||
Complete overhaul, with 36,000+ new unit tests validated against actual output generated by Bash and minimatch. More specifically, 35,000+ of the tests:
|
||||
|
||||
- micromatch results are directly compared to bash results
|
||||
- in rare cases, when micromatch and bash disagree, micromatch's results are compared to minimatch's results
|
||||
- micromatch is much more accurate than minimatch, so there were cases where I had to make assumptions. I'll try to document these.
|
||||
|
||||
This refactor introduces a parser and compiler that are supersets of more granular parsers and compilers from other sub-modules. Each of these sub-modules has a singular responsibility and focuses on a certain type of matching that aligns with a specific part of the Bash "expansion" API.
|
||||
|
||||
These sub-modules work like plugins to seamlessly create the micromatch parser/compiler, so that strings are parsed in one pass, an [AST is created](https://gist.github.com/jonschlinkert/099c8914f56529f75bc757cc9e5e8e2a), then a new string is generated by the compiler.
|
||||
|
||||
Here are those sub-modules with links to related prs on those modules if you want to see how they contribute to this code:
|
||||
|
||||
[nanomatch](https://github.com/jonschlinkert/nanomatch) (new library) - glob expansion (`*`, `**`, `?` and `[...]`))
|
||||
[braces](https://github.com/jonschlinkert/braces/pull/10) - brace expansion (`{1..10}`, `{a,b,c}`, etc)
|
||||
[extglob](https://github.com/jonschlinkert/extglob/pull/5) - extended globs (`!(a|b)`, `@(!(foo|bar))`, etc)
|
||||
[expand-brackets](https://github.com/jonschlinkert/expand-brackets/pull/5) - POSIX character classes `[[:alpha:][:digit:]]`
|
||||
|
||||
**Added**
|
||||
|
||||
- source map support (optionally created when using parse or compile - I have no idea what the use case is yet, but they come for free) (note that source maps are not generated for brace expansion at present, since the braces compiler uses a different strategy. I'll update if/when this changes).
|
||||
- parser is exposed, so that implementors can customize or override specific micromatch parsers if necessary
|
||||
- compiler is exposed, so that implementors can customize or override specific micromatch compilers if necessary
|
||||
|
||||
**Fixed**
|
||||
|
||||
- more accurate matching (passes 100% of Bash 4.3 of the brace expansion and extglob unit tests, as well as all Bash glob tests that are relevant to node.js usage, all minimatch tests, all brace-expansion tests, and also passes a couple of tests that bash fails)
|
||||
- even safer - micromatch has always generated optimized patterns so it's not subject to DoS exploits like minimatch (completely different than the regex DoS issue, minimatch and multimatch are still openly exposed to being used for DoS attacks), but more safeguards were built into this refactor
|
||||
|
||||
**Changed**
|
||||
|
||||
- the public API of this library did not change in this version and should be safe to upgrade without changing implentor code. However, we have released this as a major version for the following reasons:
|
||||
- out of an abundance of caution due to the large amount of code changed in this release
|
||||
- we have improved parser accuracy to such a degree that some implementors using invalid globs have noted change in behavior. If this is the case for you, please check that you are using a valid glob expression before logging a bug with this library
|
||||
|
||||
## [1.0.1] - 2016-12-12
|
||||
|
||||
**Added**
|
||||
|
||||
- Support for windows path edge cases where backslashes are used in brackets or other unusual combinations.
|
||||
|
||||
## [1.0.0] - 2016-12-12
|
||||
|
||||
Stable release.
|
||||
|
||||
## [0.1.0] - 2016-10-08
|
||||
|
||||
First release.
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...HEAD
|
||||
[0.2.0]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...0.2.0
|
||||
|
||||
[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog
|
21
assets_old/node_modules/micromatch/LICENSE
generated
vendored
Executable file
21
assets_old/node_modules/micromatch/LICENSE
generated
vendored
Executable file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, Jon Schlinkert.
|
||||
|
||||
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.
|
1000
assets_old/node_modules/micromatch/README.md
generated
vendored
Normal file
1000
assets_old/node_modules/micromatch/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
467
assets_old/node_modules/micromatch/index.js
generated
vendored
Normal file
467
assets_old/node_modules/micromatch/index.js
generated
vendored
Normal file
|
@ -0,0 +1,467 @@
|
|||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
const braces = require('braces');
|
||||
const picomatch = require('picomatch');
|
||||
const utils = require('picomatch/lib/utils');
|
||||
const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
|
||||
|
||||
/**
|
||||
* Returns an array of strings that match one or more glob patterns.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm(['a.js', 'a.txt'], ['*.js']));
|
||||
* //=> [ 'a.js' ]
|
||||
* ```
|
||||
* @param {String|Array<string>} list List of strings to match.
|
||||
* @param {String|Array<string>} patterns One or more glob patterns to use for matching.
|
||||
* @param {Object} options See available [options](#options)
|
||||
* @return {Array} Returns an array of matches
|
||||
* @summary false
|
||||
* @api public
|
||||
*/
|
||||
|
||||
const micromatch = (list, patterns, options) => {
|
||||
patterns = [].concat(patterns);
|
||||
list = [].concat(list);
|
||||
|
||||
let omit = new Set();
|
||||
let keep = new Set();
|
||||
let items = new Set();
|
||||
let negatives = 0;
|
||||
|
||||
let onResult = state => {
|
||||
items.add(state.output);
|
||||
if (options && options.onResult) {
|
||||
options.onResult(state);
|
||||
}
|
||||
};
|
||||
|
||||
for (let i = 0; i < patterns.length; i++) {
|
||||
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
|
||||
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
||||
if (negated) negatives++;
|
||||
|
||||
for (let item of list) {
|
||||
let matched = isMatch(item, true);
|
||||
|
||||
let match = negated ? !matched.isMatch : matched.isMatch;
|
||||
if (!match) continue;
|
||||
|
||||
if (negated) {
|
||||
omit.add(matched.output);
|
||||
} else {
|
||||
omit.delete(matched.output);
|
||||
keep.add(matched.output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let result = negatives === patterns.length ? [...items] : [...keep];
|
||||
let matches = result.filter(item => !omit.has(item));
|
||||
|
||||
if (options && matches.length === 0) {
|
||||
if (options.failglob === true) {
|
||||
throw new Error(`No matches found for "${patterns.join(', ')}"`);
|
||||
}
|
||||
|
||||
if (options.nonull === true || options.nullglob === true) {
|
||||
return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
};
|
||||
|
||||
/**
|
||||
* Backwards compatibility
|
||||
*/
|
||||
|
||||
micromatch.match = micromatch;
|
||||
|
||||
/**
|
||||
* Returns a matcher function from the given glob `pattern` and `options`.
|
||||
* The returned function takes a string to match as its only argument and returns
|
||||
* true if the string is a match.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.matcher(pattern[, options]);
|
||||
*
|
||||
* const isMatch = mm.matcher('*.!(*a)');
|
||||
* console.log(isMatch('a.a')); //=> false
|
||||
* console.log(isMatch('a.b')); //=> true
|
||||
* ```
|
||||
* @param {String} `pattern` Glob pattern
|
||||
* @param {Object} `options`
|
||||
* @return {Function} Returns a matcher function.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
||||
|
||||
/**
|
||||
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.isMatch(string, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
||||
* console.log(mm.isMatch('a.a', 'b.*')); //=> false
|
||||
* ```
|
||||
* @param {String} str The string to test.
|
||||
* @param {String|Array} patterns One or more glob patterns to use for matching.
|
||||
* @param {Object} [options] See available [options](#options).
|
||||
* @return {Boolean} Returns true if any patterns match `str`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
||||
|
||||
/**
|
||||
* Backwards compatibility
|
||||
*/
|
||||
|
||||
micromatch.any = micromatch.isMatch;
|
||||
|
||||
/**
|
||||
* Returns a list of strings that _**do not match any**_ of the given `patterns`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.not(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
|
||||
* //=> ['b.b', 'c.c']
|
||||
* ```
|
||||
* @param {Array} `list` Array of strings to match.
|
||||
* @param {String|Array} `patterns` One or more glob pattern to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Array} Returns an array of strings that **do not match** the given patterns.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.not = (list, patterns, options = {}) => {
|
||||
patterns = [].concat(patterns).map(String);
|
||||
let result = new Set();
|
||||
let items = [];
|
||||
|
||||
let onResult = state => {
|
||||
if (options.onResult) options.onResult(state);
|
||||
items.push(state.output);
|
||||
};
|
||||
|
||||
let matches = micromatch(list, patterns, { ...options, onResult });
|
||||
|
||||
for (let item of items) {
|
||||
if (!matches.includes(item)) {
|
||||
result.add(item);
|
||||
}
|
||||
}
|
||||
return [...result];
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the given `string` contains the given pattern. Similar
|
||||
* to [.isMatch](#isMatch) but the pattern can match any part of the string.
|
||||
*
|
||||
* ```js
|
||||
* var mm = require('micromatch');
|
||||
* // mm.contains(string, pattern[, options]);
|
||||
*
|
||||
* console.log(mm.contains('aa/bb/cc', '*b'));
|
||||
* //=> true
|
||||
* console.log(mm.contains('aa/bb/cc', '*d'));
|
||||
* //=> false
|
||||
* ```
|
||||
* @param {String} `str` The string to match.
|
||||
* @param {String|Array} `patterns` Glob pattern to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if the patter matches any part of `str`.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.contains = (str, pattern, options) => {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
||||
}
|
||||
|
||||
if (Array.isArray(pattern)) {
|
||||
return pattern.some(p => micromatch.contains(str, p, options));
|
||||
}
|
||||
|
||||
if (typeof pattern === 'string') {
|
||||
if (isEmptyString(str) || isEmptyString(pattern)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return micromatch.isMatch(str, pattern, { ...options, contains: true });
|
||||
};
|
||||
|
||||
/**
|
||||
* Filter the keys of the given object with the given `glob` pattern
|
||||
* and `options`. Does not attempt to match nested keys. If you need this feature,
|
||||
* use [glob-object][] instead.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.matchKeys(object, patterns[, options]);
|
||||
*
|
||||
* const obj = { aa: 'a', ab: 'b', ac: 'c' };
|
||||
* console.log(mm.matchKeys(obj, '*b'));
|
||||
* //=> { ab: 'b' }
|
||||
* ```
|
||||
* @param {Object} `object` The object with keys to filter.
|
||||
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Object} Returns an object with only keys that match the given patterns.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.matchKeys = (obj, patterns, options) => {
|
||||
if (!utils.isObject(obj)) {
|
||||
throw new TypeError('Expected the first argument to be an object');
|
||||
}
|
||||
let keys = micromatch(Object.keys(obj), patterns, options);
|
||||
let res = {};
|
||||
for (let key of keys) res[key] = obj[key];
|
||||
return res;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.some(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
||||
* // true
|
||||
* console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
|
||||
* // false
|
||||
* ```
|
||||
* @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
|
||||
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if any patterns match `str`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.some = (list, patterns, options) => {
|
||||
let items = [].concat(list);
|
||||
|
||||
for (let pattern of [].concat(patterns)) {
|
||||
let isMatch = picomatch(String(pattern), options);
|
||||
if (items.some(item => isMatch(item))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if every string in the given `list` matches
|
||||
* any of the given glob `patterns`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.every(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.every('foo.js', ['foo.js']));
|
||||
* // true
|
||||
* console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
|
||||
* // true
|
||||
* console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
||||
* // false
|
||||
* console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
|
||||
* // false
|
||||
* ```
|
||||
* @param {String|Array} `list` The string or array of strings to test.
|
||||
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if any patterns match `str`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.every = (list, patterns, options) => {
|
||||
let items = [].concat(list);
|
||||
|
||||
for (let pattern of [].concat(patterns)) {
|
||||
let isMatch = picomatch(String(pattern), options);
|
||||
if (!items.every(item => isMatch(item))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if **all** of the given `patterns` match
|
||||
* the specified string.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.all(string, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['foo.js']));
|
||||
* // true
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['*.js', '!foo.js']));
|
||||
* // false
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['*.js', 'foo.js']));
|
||||
* // true
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
|
||||
* // true
|
||||
* ```
|
||||
* @param {String|Array} `str` The string to test.
|
||||
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if any patterns match `str`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.all = (str, patterns, options) => {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
||||
}
|
||||
|
||||
return [].concat(patterns).every(p => picomatch(p, options)(str));
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.capture(pattern, string[, options]);
|
||||
*
|
||||
* console.log(mm.capture('test/*.js', 'test/foo.js'));
|
||||
* //=> ['foo']
|
||||
* console.log(mm.capture('test/*.js', 'foo/bar.css'));
|
||||
* //=> null
|
||||
* ```
|
||||
* @param {String} `glob` Glob pattern to use for matching.
|
||||
* @param {String} `input` String to match
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.capture = (glob, input, options) => {
|
||||
let posix = utils.isWindows(options);
|
||||
let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
|
||||
let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
|
||||
|
||||
if (match) {
|
||||
return match.slice(1).map(v => v === void 0 ? '' : v);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a regular expression from the given glob `pattern`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.makeRe(pattern[, options]);
|
||||
*
|
||||
* console.log(mm.makeRe('*.js'));
|
||||
* //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
|
||||
* ```
|
||||
* @param {String} `pattern` A glob pattern to convert to regex.
|
||||
* @param {Object} `options`
|
||||
* @return {RegExp} Returns a regex created from the given pattern.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
||||
|
||||
/**
|
||||
* Scan a glob pattern to separate the pattern into segments. Used
|
||||
* by the [split](#split) method.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* const state = mm.scan(pattern[, options]);
|
||||
* ```
|
||||
* @param {String} `pattern`
|
||||
* @param {Object} `options`
|
||||
* @return {Object} Returns an object with
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.scan = (...args) => picomatch.scan(...args);
|
||||
|
||||
/**
|
||||
* Parse a glob pattern to create the source string for a regular
|
||||
* expression.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* const state = mm(pattern[, options]);
|
||||
* ```
|
||||
* @param {String} `glob`
|
||||
* @param {Object} `options`
|
||||
* @return {Object} Returns an object with useful properties and output to be used as regex source string.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.parse = (patterns, options) => {
|
||||
let res = [];
|
||||
for (let pattern of [].concat(patterns || [])) {
|
||||
for (let str of braces(String(pattern), options)) {
|
||||
res.push(picomatch.parse(str, options));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
/**
|
||||
* Process the given brace `pattern`.
|
||||
*
|
||||
* ```js
|
||||
* const { braces } = require('micromatch');
|
||||
* console.log(braces('foo/{a,b,c}/bar'));
|
||||
* //=> [ 'foo/(a|b|c)/bar' ]
|
||||
*
|
||||
* console.log(braces('foo/{a,b,c}/bar', { expand: true }));
|
||||
* //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
|
||||
* ```
|
||||
* @param {String} `pattern` String with brace pattern to process.
|
||||
* @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
|
||||
* @return {Array}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.braces = (pattern, options) => {
|
||||
if (typeof pattern !== 'string') throw new TypeError('Expected a string');
|
||||
if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
|
||||
return [pattern];
|
||||
}
|
||||
return braces(pattern, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Expand braces
|
||||
*/
|
||||
|
||||
micromatch.braceExpand = (pattern, options) => {
|
||||
if (typeof pattern !== 'string') throw new TypeError('Expected a string');
|
||||
return micromatch.braces(pattern, { ...options, expand: true });
|
||||
};
|
||||
|
||||
/**
|
||||
* Expose micromatch
|
||||
*/
|
||||
|
||||
module.exports = micromatch;
|
118
assets_old/node_modules/micromatch/package.json
generated
vendored
Normal file
118
assets_old/node_modules/micromatch/package.json
generated
vendored
Normal file
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"name": "micromatch",
|
||||
"description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.",
|
||||
"version": "4.0.2",
|
||||
"homepage": "https://github.com/micromatch/micromatch",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"(https://github.com/DianeLooney)",
|
||||
"Amila Welihinda (amilajack.com)",
|
||||
"Bogdan Chadkin (https://github.com/TrySound)",
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"Devon Govett (http://badassjs.com)",
|
||||
"Elan Shanker (https://github.com/es128)",
|
||||
"Fabrício Matté (https://ultcombo.js.org)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Martin Kolárik (https://kolarik.sk)",
|
||||
"Olsten Larck (https://i.am.charlike.online)",
|
||||
"Paul Miller (paulmillr.com)",
|
||||
"Tom Byrer (https://github.com/tomByrer)",
|
||||
"Tyler Akins (http://rumkin.com)",
|
||||
"Peter Bright <drpizza@quiscalusmexicanus.org> (https://github.com/drpizza)"
|
||||
],
|
||||
"repository": "micromatch/micromatch",
|
||||
"bugs": {
|
||||
"url": "https://github.com/micromatch/micromatch/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"braces": "^3.0.1",
|
||||
"picomatch": "^2.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"fill-range": "^7.0.1",
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"mocha": "^5.2.0",
|
||||
"time-require": "github:jonschlinkert/time-require"
|
||||
},
|
||||
"keywords": [
|
||||
"bash",
|
||||
"bracket",
|
||||
"character-class",
|
||||
"expand",
|
||||
"expansion",
|
||||
"expression",
|
||||
"extglob",
|
||||
"extglobs",
|
||||
"file",
|
||||
"files",
|
||||
"filter",
|
||||
"find",
|
||||
"glob",
|
||||
"globbing",
|
||||
"globs",
|
||||
"globstar",
|
||||
"lookahead",
|
||||
"lookaround",
|
||||
"lookbehind",
|
||||
"match",
|
||||
"matcher",
|
||||
"matches",
|
||||
"matching",
|
||||
"micromatch",
|
||||
"minimatch",
|
||||
"multimatch",
|
||||
"negate",
|
||||
"negation",
|
||||
"path",
|
||||
"pattern",
|
||||
"patterns",
|
||||
"posix",
|
||||
"regex",
|
||||
"regexp",
|
||||
"regular",
|
||||
"shell",
|
||||
"star",
|
||||
"wildcard"
|
||||
],
|
||||
"verb": {
|
||||
"toc": "collapsible",
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"related": {
|
||||
"list": [
|
||||
"braces",
|
||||
"expand-brackets",
|
||||
"extglob",
|
||||
"fill-range",
|
||||
"nanomatch"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"extglob",
|
||||
"fill-range",
|
||||
"glob-object",
|
||||
"minimatch",
|
||||
"multimatch"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue