WIP - add extractor, generate snippet_data
This commit is contained in:
17
node_modules/is-valid-path/.editorconfig
generated
vendored
Normal file
17
node_modules/is-valid-path/.editorconfig
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[test/fixtures/*]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
14
node_modules/is-valid-path/.gitattributes
generated
vendored
Normal file
14
node_modules/is-valid-path/.gitattributes
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
# Enforce Unix newlines
|
||||
*.* text eol=lf
|
||||
*.css text eol=lf
|
||||
*.html text eol=lf
|
||||
*.js text eol=lf
|
||||
*.json text eol=lf
|
||||
*.less text eol=lf
|
||||
*.md text eol=lf
|
||||
*.yml text eol=lf
|
||||
|
||||
*.jpg binary
|
||||
*.gif binary
|
||||
*.png binary
|
||||
*.jpeg binary
|
||||
18
node_modules/is-valid-path/.jshintrc
generated
vendored
Normal file
18
node_modules/is-valid-path/.jshintrc
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"asi": false,
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"eqnull": true,
|
||||
"esnext": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"laxcomma": false,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"node": true,
|
||||
"sub": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"mocha": true
|
||||
}
|
||||
11
node_modules/is-valid-path/.npmignore
generated
vendored
Normal file
11
node_modules/is-valid-path/.npmignore
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
*.sublime-*
|
||||
_gh_pages
|
||||
actual
|
||||
bower_components
|
||||
node_modules
|
||||
npm-debug.log
|
||||
temp
|
||||
test/actual
|
||||
tmp
|
||||
TODO.md
|
||||
vendor
|
||||
68
node_modules/is-valid-path/.verb.md
generated
vendored
Normal file
68
node_modules/is-valid-path/.verb.md
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
# {%= name %} {%= badge("fury") %}
|
||||
|
||||
> {%= description %}
|
||||
|
||||
{%= include("install-npm", {save: true}) %}
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isValid = require('{%= name %}');
|
||||
|
||||
/**
|
||||
* Valid
|
||||
*/
|
||||
|
||||
isValid('abc.js');
|
||||
//=> 'true'
|
||||
isValid('abc/def/ghi.js');
|
||||
//=> 'true'
|
||||
isValid('foo.js');
|
||||
//=> 'true'
|
||||
|
||||
|
||||
/**
|
||||
* Invalid
|
||||
*/
|
||||
|
||||
isValid();
|
||||
//=> 'valse'
|
||||
isValid(null);
|
||||
//=> 'valse'
|
||||
isValid('!foo.js');
|
||||
//=> 'false'
|
||||
isValid('*.js');
|
||||
//=> 'false'
|
||||
isValid('**/abc.js');
|
||||
//=> 'false'
|
||||
isValid('abc/*.js');
|
||||
//=> 'false'
|
||||
isValid('abc/(aaa|bbb).js');
|
||||
//=> 'false'
|
||||
isValid('abc/[a-z].js');
|
||||
//=> 'false'
|
||||
isValid('abc/{a,b}.js');
|
||||
//=> 'false'
|
||||
isValid('abc/?.js');
|
||||
//=> 'false'
|
||||
```
|
||||
|
||||
## Related
|
||||
{%= related(['is-glob', 'is-invalid-path', 'is-valid-path', 'is-git-url', 'micromatch', 'parse-glob'], {remove: name}) %}
|
||||
|
||||
## Run tests
|
||||
{%= include("tests") %}
|
||||
|
||||
## Contributing
|
||||
{%= include("contributing") %}
|
||||
|
||||
## Author
|
||||
{%= include("author") %}
|
||||
|
||||
## License
|
||||
{%= copyright() %}
|
||||
{%= license() %}
|
||||
|
||||
***
|
||||
|
||||
{%= include("footer") %}
|
||||
21
node_modules/is-valid-path/LICENSE
generated
vendored
Normal file
21
node_modules/is-valid-path/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 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.
|
||||
87
node_modules/is-valid-path/README.md
generated
vendored
Normal file
87
node_modules/is-valid-path/README.md
generated
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# is-valid-path [](http://badge.fury.io/js/is-valid-path)
|
||||
|
||||
> Returns true if a file path does not contain any invalid characters.
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```bash
|
||||
npm i is-valid-path --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isValid = require('is-valid-path');
|
||||
|
||||
/**
|
||||
* Valid
|
||||
*/
|
||||
|
||||
isValid('abc.js');
|
||||
//=> 'true'
|
||||
isValid('abc/def/ghi.js');
|
||||
//=> 'true'
|
||||
isValid('foo.js');
|
||||
//=> 'true'
|
||||
|
||||
/**
|
||||
* Invalid
|
||||
*/
|
||||
|
||||
isValid();
|
||||
//=> 'valse'
|
||||
isValid(null);
|
||||
//=> 'valse'
|
||||
isValid('!foo.js');
|
||||
//=> 'false'
|
||||
isValid('*.js');
|
||||
//=> 'false'
|
||||
isValid('**/abc.js');
|
||||
//=> 'false'
|
||||
isValid('abc/*.js');
|
||||
//=> 'false'
|
||||
isValid('abc/(aaa|bbb).js');
|
||||
//=> 'false'
|
||||
isValid('abc/[a-z].js');
|
||||
//=> 'false'
|
||||
isValid('abc/{a,b}.js');
|
||||
//=> 'false'
|
||||
isValid('abc/?.js');
|
||||
//=> 'false'
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern.
|
||||
* [is-invalid-path](https://github.com/jonschlinkert/is-invalid-path): Returns true if a file path has invalid characters.
|
||||
* [is-git-url](https://github.com/jonschlinkert/is-git-url): Regex to validate that a URL is a git url.
|
||||
* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://github.com/jonschlinkert/micromatch)
|
||||
* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens.
|
||||
|
||||
## Run tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```bash
|
||||
npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-valid-path/issues)
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2015 Jon Schlinkert
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 06, 2015._
|
||||
14
node_modules/is-valid-path/index.js
generated
vendored
Normal file
14
node_modules/is-valid-path/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/*!
|
||||
* is-valid-path <https://github.com/jonschlinkert/is-valid-path>
|
||||
*
|
||||
* Copyright (c) 2015 Jon Schlinkert, contributors.
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var isInvalidPath = require('is-invalid-path');
|
||||
|
||||
module.exports = function (str) {
|
||||
return isInvalidPath(str) === false;
|
||||
};
|
||||
86
node_modules/is-valid-path/package.json
generated
vendored
Normal file
86
node_modules/is-valid-path/package.json
generated
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
{
|
||||
"_from": "is-valid-path@^0.1.1",
|
||||
"_id": "is-valid-path@0.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-EQ+f90w39mPh7HkV60UfLbk6yd8=",
|
||||
"_location": "/is-valid-path",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-valid-path@^0.1.1",
|
||||
"name": "is-valid-path",
|
||||
"escapedName": "is-valid-path",
|
||||
"rawSpec": "^0.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gatsby/gatsby-cli"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-valid-path/-/is-valid-path-0.1.1.tgz",
|
||||
"_shasum": "110f9ff74c37f663e1ec7915eb451f2db93ac9df",
|
||||
"_spec": "is-valid-path@^0.1.1",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/gatsby/node_modules/gatsby-cli",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-valid-path/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"is-invalid-path": "^0.1.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Returns true if a file path does not contain any invalid characters.",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"homepage": "https://github.com/jonschlinkert/is-valid-path",
|
||||
"keywords": [
|
||||
"bash",
|
||||
"braces",
|
||||
"character",
|
||||
"check",
|
||||
"exec",
|
||||
"expression",
|
||||
"extglob",
|
||||
"file",
|
||||
"filepath",
|
||||
"glob",
|
||||
"globbing",
|
||||
"globstar",
|
||||
"invalid",
|
||||
"match",
|
||||
"matches",
|
||||
"path",
|
||||
"pattern",
|
||||
"regex",
|
||||
"regexp",
|
||||
"regular",
|
||||
"string",
|
||||
"test",
|
||||
"valid",
|
||||
"validate"
|
||||
],
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/jonschlinkert/is-valid-path/blob/master/LICENSE"
|
||||
},
|
||||
"main": "index.js",
|
||||
"name": "is-valid-path",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jonschlinkert/is-valid-path.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.1.1"
|
||||
}
|
||||
71
node_modules/is-valid-path/test.js
generated
vendored
Normal file
71
node_modules/is-valid-path/test.js
generated
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/*!
|
||||
* is-valid-path <https://github.com/jonschlinkert/is-valid-path>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/* deps: mocha */
|
||||
require('should');
|
||||
var isValid = require('./');
|
||||
|
||||
describe('isValid', function () {
|
||||
it('should return `true` if the path is valid:', function () {
|
||||
isValid('.').should.be.true;
|
||||
isValid('aa').should.be.true;
|
||||
isValid('abc.js').should.be.true;
|
||||
isValid('abc/def/ghi.js').should.be.true;
|
||||
});
|
||||
|
||||
it('should return `false` if it is a glob pattern:', function () {
|
||||
isValid('*.js').should.be.false;
|
||||
isValid('!*.js').should.be.false;
|
||||
isValid('!foo').should.be.false;
|
||||
isValid('!foo.js').should.be.false;
|
||||
isValid('**/abc.js').should.be.false;
|
||||
isValid('abc/*.js').should.be.false;
|
||||
});
|
||||
|
||||
it('should return `false` if the path has brace characters:', function () {
|
||||
isValid('abc/{a,b}.js').should.be.false;
|
||||
isValid('abc/{a..z}.js').should.be.false;
|
||||
isValid('abc/{a..z..2}.js').should.be.false;
|
||||
});
|
||||
|
||||
it('should return `false` if it has an extglob:', function () {
|
||||
isValid('abc/@(a).js').should.be.false;
|
||||
isValid('abc/!(a).js').should.be.false;
|
||||
isValid('abc/+(a).js').should.be.false;
|
||||
isValid('abc/*(a).js').should.be.false;
|
||||
isValid('abc/?(a).js').should.be.false;
|
||||
});
|
||||
|
||||
it('should return `false` if it has extglob characters:', function () {
|
||||
isValid('abc/@.js').should.be.false;
|
||||
isValid('abc/!.js').should.be.false;
|
||||
isValid('abc/+.js').should.be.false;
|
||||
isValid('abc/*.js').should.be.false;
|
||||
isValid('abc/?.js').should.be.false;
|
||||
});
|
||||
|
||||
it('should return `false` if the path has regex characters:', function () {
|
||||
isValid('abc/(aaa|bbb).js').should.be.false;
|
||||
isValid('abc/?.js').should.be.false;
|
||||
isValid('?.js').should.be.false;
|
||||
isValid('[abc].js').should.be.false;
|
||||
isValid('[^abc].js').should.be.false;
|
||||
isValid('a/b/c/[a-z].js').should.be.false;
|
||||
isValid('[a-j]*[^c]b/c').should.be.false;
|
||||
});
|
||||
|
||||
it('should return `false` if it is not a string:', function () {
|
||||
isValid().should.be.false;
|
||||
isValid({}).should.be.false;
|
||||
isValid(null).should.be.false;
|
||||
isValid(['**/*.js']).should.be.false;
|
||||
isValid(['foo.js']).should.be.false;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user