WIP - add extractor, generate snippet_data
This commit is contained in:
82
node_modules/meow/index.js
generated
vendored
Normal file
82
node_modules/meow/index.js
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var minimist = require('minimist');
|
||||
var objectAssign = require('object-assign');
|
||||
var camelcaseKeys = require('camelcase-keys');
|
||||
var decamelize = require('decamelize');
|
||||
var mapObj = require('map-obj');
|
||||
var trimNewlines = require('trim-newlines');
|
||||
var redent = require('redent');
|
||||
var readPkgUp = require('read-pkg-up');
|
||||
var loudRejection = require('loud-rejection');
|
||||
var normalizePackageData = require('normalize-package-data');
|
||||
|
||||
// get the uncached parent
|
||||
delete require.cache[__filename];
|
||||
var parentDir = path.dirname(module.parent.filename);
|
||||
|
||||
module.exports = function (opts, minimistOpts) {
|
||||
loudRejection();
|
||||
|
||||
if (Array.isArray(opts) || typeof opts === 'string') {
|
||||
opts = {help: opts};
|
||||
}
|
||||
|
||||
opts = objectAssign({
|
||||
pkg: readPkgUp.sync({
|
||||
cwd: parentDir,
|
||||
normalize: false
|
||||
}).pkg,
|
||||
argv: process.argv.slice(2)
|
||||
}, opts);
|
||||
|
||||
minimistOpts = objectAssign({}, minimistOpts);
|
||||
|
||||
minimistOpts.default = mapObj(minimistOpts.default || {}, function (key, value) {
|
||||
return [decamelize(key, '-'), value];
|
||||
});
|
||||
|
||||
if (Array.isArray(opts.help)) {
|
||||
opts.help = opts.help.join('\n');
|
||||
}
|
||||
|
||||
var pkg = typeof opts.pkg === 'string' ? require(path.join(parentDir, opts.pkg)) : opts.pkg;
|
||||
var argv = minimist(opts.argv, minimistOpts);
|
||||
var help = redent(trimNewlines(opts.help || ''), 2);
|
||||
|
||||
normalizePackageData(pkg);
|
||||
|
||||
process.title = pkg.bin ? Object.keys(pkg.bin)[0] : pkg.name;
|
||||
|
||||
var description = opts.description;
|
||||
if (!description && description !== false) {
|
||||
description = pkg.description;
|
||||
}
|
||||
|
||||
help = (description ? '\n ' + description + '\n' : '') + (help ? '\n' + help : '\n');
|
||||
|
||||
var showHelp = function (code) {
|
||||
console.log(help);
|
||||
process.exit(code || 0);
|
||||
};
|
||||
|
||||
if (argv.version && opts.version !== false) {
|
||||
console.log(typeof opts.version === 'string' ? opts.version : pkg.version);
|
||||
process.exit();
|
||||
}
|
||||
|
||||
if (argv.help && opts.help !== false) {
|
||||
showHelp();
|
||||
}
|
||||
|
||||
var _ = argv._;
|
||||
delete argv._;
|
||||
|
||||
return {
|
||||
input: _,
|
||||
flags: camelcaseKeys(argv),
|
||||
pkg: pkg,
|
||||
help: help,
|
||||
showHelp: showHelp
|
||||
};
|
||||
};
|
||||
21
node_modules/meow/license
generated
vendored
Normal file
21
node_modules/meow/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.
|
||||
53
node_modules/meow/node_modules/find-up/index.js
generated
vendored
Normal file
53
node_modules/meow/node_modules/find-up/index.js
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var pathExists = require('path-exists');
|
||||
var Promise = require('pinkie-promise');
|
||||
|
||||
function splitPath(x) {
|
||||
return path.resolve(x || '').split(path.sep);
|
||||
}
|
||||
|
||||
function join(parts, filename) {
|
||||
return path.resolve(parts.join(path.sep) + path.sep, filename);
|
||||
}
|
||||
|
||||
module.exports = function (filename, opts) {
|
||||
opts = opts || {};
|
||||
|
||||
var parts = splitPath(opts.cwd);
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
(function find() {
|
||||
var fp = join(parts, filename);
|
||||
|
||||
pathExists(fp).then(function (exists) {
|
||||
if (exists) {
|
||||
resolve(fp);
|
||||
} else if (parts.pop()) {
|
||||
find();
|
||||
} else {
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
})();
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = function (filename, opts) {
|
||||
opts = opts || {};
|
||||
|
||||
var parts = splitPath(opts.cwd);
|
||||
var len = parts.length;
|
||||
|
||||
while (len--) {
|
||||
var fp = join(parts, filename);
|
||||
|
||||
if (pathExists.sync(fp)) {
|
||||
return fp;
|
||||
}
|
||||
|
||||
parts.pop();
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
21
node_modules/meow/node_modules/find-up/license
generated
vendored
Normal file
21
node_modules/meow/node_modules/find-up/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.
|
||||
83
node_modules/meow/node_modules/find-up/package.json
generated
vendored
Normal file
83
node_modules/meow/node_modules/find-up/package.json
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
"_from": "find-up@^1.0.0",
|
||||
"_id": "find-up@1.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
|
||||
"_location": "/meow/find-up",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "find-up@^1.0.0",
|
||||
"name": "find-up",
|
||||
"escapedName": "find-up",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/meow/read-pkg-up"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
||||
"_shasum": "6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f",
|
||||
"_spec": "find-up@^1.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/meow/node_modules/read-pkg-up",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/find-up/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"path-exists": "^2.0.0",
|
||||
"pinkie-promise": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Find a file by walking up parent directories",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"tempfile": "^1.1.1",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/find-up#readme",
|
||||
"keywords": [
|
||||
"find",
|
||||
"up",
|
||||
"find-up",
|
||||
"findup",
|
||||
"look-up",
|
||||
"look",
|
||||
"file",
|
||||
"search",
|
||||
"match",
|
||||
"package",
|
||||
"resolve",
|
||||
"parent",
|
||||
"parents",
|
||||
"folder",
|
||||
"directory",
|
||||
"dir",
|
||||
"walk",
|
||||
"walking",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "find-up",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/find-up.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.2"
|
||||
}
|
||||
72
node_modules/meow/node_modules/find-up/readme.md
generated
vendored
Normal file
72
node_modules/meow/node_modules/find-up/readme.md
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
# find-up [](https://travis-ci.org/sindresorhus/find-up)
|
||||
|
||||
> Find a file by walking up parent directories
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save find-up
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/
|
||||
└── Users
|
||||
└── sindresorhus
|
||||
├── unicorn.png
|
||||
└── foo
|
||||
└── bar
|
||||
├── baz
|
||||
└── example.js
|
||||
```
|
||||
|
||||
```js
|
||||
// example.js
|
||||
const findUp = require('find-up');
|
||||
|
||||
findUp('unicorn.png').then(filepath => {
|
||||
console.log(filepath);
|
||||
//=> '/Users/sindresorhus/unicorn.png'
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### findUp(filename, [options])
|
||||
|
||||
Returns a promise for the filepath or `null`.
|
||||
|
||||
### findUp.sync(filename, [options])
|
||||
|
||||
Returns a filepath or `null`.
|
||||
|
||||
#### filename
|
||||
|
||||
Type: `string`
|
||||
|
||||
Filename of the file to find.
|
||||
|
||||
#### options
|
||||
|
||||
##### cwd
|
||||
|
||||
Type: `string`
|
||||
Default: `process.cwd()`
|
||||
|
||||
Directory to start from.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
|
||||
- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
|
||||
- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
21
node_modules/meow/node_modules/load-json-file/index.js
generated
vendored
Normal file
21
node_modules/meow/node_modules/load-json-file/index.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var fs = require('graceful-fs');
|
||||
var stripBom = require('strip-bom');
|
||||
var parseJson = require('parse-json');
|
||||
var Promise = require('pinkie-promise');
|
||||
var pify = require('pify');
|
||||
|
||||
function parse(x, fp) {
|
||||
return parseJson(stripBom(x), path.relative(process.cwd(), fp));
|
||||
}
|
||||
|
||||
module.exports = function (fp) {
|
||||
return pify(fs.readFile, Promise)(fp, 'utf8').then(function (data) {
|
||||
return parse(data, fp);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = function (fp) {
|
||||
return parse(fs.readFileSync(fp, 'utf8'), fp);
|
||||
};
|
||||
21
node_modules/meow/node_modules/load-json-file/license
generated
vendored
Normal file
21
node_modules/meow/node_modules/load-json-file/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.
|
||||
78
node_modules/meow/node_modules/load-json-file/package.json
generated
vendored
Normal file
78
node_modules/meow/node_modules/load-json-file/package.json
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
{
|
||||
"_from": "load-json-file@^1.0.0",
|
||||
"_id": "load-json-file@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
||||
"_location": "/meow/load-json-file",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "load-json-file@^1.0.0",
|
||||
"name": "load-json-file",
|
||||
"escapedName": "load-json-file",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/meow/read-pkg"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||
"_shasum": "956905708d58b4bab4c2261b04f59f31c99374c0",
|
||||
"_spec": "load-json-file@^1.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/meow/node_modules/read-pkg",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/load-json-file/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"parse-json": "^2.2.0",
|
||||
"pify": "^2.0.0",
|
||||
"pinkie-promise": "^2.0.0",
|
||||
"strip-bom": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Read and parse a JSON file",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/load-json-file#readme",
|
||||
"keywords": [
|
||||
"json",
|
||||
"read",
|
||||
"parse",
|
||||
"file",
|
||||
"fs",
|
||||
"graceful",
|
||||
"load"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "load-json-file",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/load-json-file.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0",
|
||||
"xo": {
|
||||
"ignores": [
|
||||
"test.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
45
node_modules/meow/node_modules/load-json-file/readme.md
generated
vendored
Normal file
45
node_modules/meow/node_modules/load-json-file/readme.md
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# load-json-file [](https://travis-ci.org/sindresorhus/load-json-file)
|
||||
|
||||
> Read and parse a JSON file
|
||||
|
||||
[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json).
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save load-json-file
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const loadJsonFile = require('load-json-file');
|
||||
|
||||
loadJsonFile('foo.json').then(json => {
|
||||
console.log(json);
|
||||
//=> {foo: true}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### loadJsonFile(filepath)
|
||||
|
||||
Returns a promise that resolves to the parsed JSON.
|
||||
|
||||
### loadJsonFile.sync(filepath)
|
||||
|
||||
Returns the parsed JSON.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
24
node_modules/meow/node_modules/path-exists/index.js
generated
vendored
Normal file
24
node_modules/meow/node_modules/path-exists/index.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
var fs = require('fs');
|
||||
var Promise = require('pinkie-promise');
|
||||
|
||||
module.exports = function (fp) {
|
||||
var fn = typeof fs.access === 'function' ? fs.access : fs.stat;
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
fn(fp, function (err) {
|
||||
resolve(!err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = function (fp) {
|
||||
var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync;
|
||||
|
||||
try {
|
||||
fn(fp);
|
||||
return true;
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
21
node_modules/meow/node_modules/path-exists/license
generated
vendored
Normal file
21
node_modules/meow/node_modules/path-exists/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.
|
||||
72
node_modules/meow/node_modules/path-exists/package.json
generated
vendored
Normal file
72
node_modules/meow/node_modules/path-exists/package.json
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"_from": "path-exists@^2.0.0",
|
||||
"_id": "path-exists@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
|
||||
"_location": "/meow/path-exists",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "path-exists@^2.0.0",
|
||||
"name": "path-exists",
|
||||
"escapedName": "path-exists",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/meow/find-up"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
|
||||
"_shasum": "0feb6c64f0fc518d9a754dd5efb62c7022761f4b",
|
||||
"_spec": "path-exists@^2.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/meow/node_modules/find-up",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/path-exists/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"pinkie-promise": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Check if a path exists",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/path-exists#readme",
|
||||
"keywords": [
|
||||
"path",
|
||||
"exists",
|
||||
"exist",
|
||||
"file",
|
||||
"filepath",
|
||||
"fs",
|
||||
"filesystem",
|
||||
"file-system",
|
||||
"access",
|
||||
"stat"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "path-exists",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/path-exists.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
}
|
||||
45
node_modules/meow/node_modules/path-exists/readme.md
generated
vendored
Normal file
45
node_modules/meow/node_modules/path-exists/readme.md
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# path-exists [](https://travis-ci.org/sindresorhus/path-exists)
|
||||
|
||||
> Check if a path exists
|
||||
|
||||
Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
|
||||
|
||||
Never use this before handling a file though:
|
||||
|
||||
> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save path-exists
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
var pathExists = require('path-exists');
|
||||
|
||||
pathExists('foo.js').then(function (exists) {
|
||||
console.log(exists);
|
||||
//=> true
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pathExists(path)
|
||||
|
||||
Returns a promise that resolves to a boolean of whether the path exists.
|
||||
|
||||
### pathExists.sync(path)
|
||||
|
||||
Returns a boolean of whether the path exists.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
29
node_modules/meow/node_modules/path-type/index.js
generated
vendored
Normal file
29
node_modules/meow/node_modules/path-type/index.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
var fs = require('graceful-fs');
|
||||
var Promise = require('pinkie-promise');
|
||||
var pify = require('pify');
|
||||
|
||||
function type(fn, fn2, fp) {
|
||||
if (typeof fp !== 'string') {
|
||||
return Promise.reject(new TypeError('Expected a string'));
|
||||
}
|
||||
|
||||
return pify(fs[fn], Promise)(fp).then(function (stats) {
|
||||
return stats[fn2]();
|
||||
});
|
||||
}
|
||||
|
||||
function typeSync(fn, fn2, fp) {
|
||||
if (typeof fp !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
return fs[fn](fp)[fn2]();
|
||||
}
|
||||
|
||||
exports.file = type.bind(null, 'stat', 'isFile');
|
||||
exports.dir = type.bind(null, 'stat', 'isDirectory');
|
||||
exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink');
|
||||
exports.fileSync = typeSync.bind(null, 'statSync', 'isFile');
|
||||
exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory');
|
||||
exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
|
||||
21
node_modules/meow/node_modules/path-type/license
generated
vendored
Normal file
21
node_modules/meow/node_modules/path-type/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.
|
||||
84
node_modules/meow/node_modules/path-type/package.json
generated
vendored
Normal file
84
node_modules/meow/node_modules/path-type/package.json
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"_from": "path-type@^1.0.0",
|
||||
"_id": "path-type@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
|
||||
"_location": "/meow/path-type",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "path-type@^1.0.0",
|
||||
"name": "path-type",
|
||||
"escapedName": "path-type",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/meow/read-pkg"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
|
||||
"_shasum": "59c44f7ee491da704da415da5a4070ba4f8fe441",
|
||||
"_spec": "path-type@^1.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/meow/node_modules/read-pkg",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/path-type/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"pify": "^2.0.0",
|
||||
"pinkie-promise": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Check if a path is a file, directory, or symlink",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/path-type#readme",
|
||||
"keywords": [
|
||||
"path",
|
||||
"fs",
|
||||
"type",
|
||||
"is",
|
||||
"check",
|
||||
"directory",
|
||||
"dir",
|
||||
"file",
|
||||
"filepath",
|
||||
"symlink",
|
||||
"symbolic",
|
||||
"link",
|
||||
"stat",
|
||||
"stats",
|
||||
"filesystem"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "path-type",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/path-type.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0",
|
||||
"xo": {
|
||||
"ignores": [
|
||||
"test.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
42
node_modules/meow/node_modules/path-type/readme.md
generated
vendored
Normal file
42
node_modules/meow/node_modules/path-type/readme.md
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
# path-type [](https://travis-ci.org/sindresorhus/path-type)
|
||||
|
||||
> Check if a path is a file, directory, or symlink
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save path-type
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var pathType = require('path-type');
|
||||
|
||||
pathType.file('package.json').then(function (isFile) {
|
||||
console.log(isFile);
|
||||
//=> true
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### .file(path)
|
||||
### .dir(path)
|
||||
### .symlink(path)
|
||||
|
||||
Returns a promise that resolves to a boolean of whether the path is the checked type.
|
||||
|
||||
### .fileSync(path)
|
||||
### .dirSync(path)
|
||||
### .symlinkSync(path)
|
||||
|
||||
Returns a boolean of whether the path is the checked type.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
31
node_modules/meow/node_modules/read-pkg-up/index.js
generated
vendored
Normal file
31
node_modules/meow/node_modules/read-pkg-up/index.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
var findUp = require('find-up');
|
||||
var readPkg = require('read-pkg');
|
||||
|
||||
module.exports = function (opts) {
|
||||
return findUp('package.json', opts).then(function (fp) {
|
||||
if (!fp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return readPkg(fp, opts).then(function (pkg) {
|
||||
return {
|
||||
pkg: pkg,
|
||||
path: fp
|
||||
};
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = function (opts) {
|
||||
var fp = findUp.sync('package.json', opts);
|
||||
|
||||
if (!fp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return {
|
||||
pkg: readPkg.sync(fp, opts),
|
||||
path: fp
|
||||
};
|
||||
};
|
||||
21
node_modules/meow/node_modules/read-pkg-up/license
generated
vendored
Normal file
21
node_modules/meow/node_modules/read-pkg-up/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.
|
||||
91
node_modules/meow/node_modules/read-pkg-up/package.json
generated
vendored
Normal file
91
node_modules/meow/node_modules/read-pkg-up/package.json
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
{
|
||||
"_from": "read-pkg-up@^1.0.1",
|
||||
"_id": "read-pkg-up@1.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
|
||||
"_location": "/meow/read-pkg-up",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "read-pkg-up@^1.0.1",
|
||||
"name": "read-pkg-up",
|
||||
"escapedName": "read-pkg-up",
|
||||
"rawSpec": "^1.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/meow"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
|
||||
"_shasum": "9d63c13276c065918d57f002a57f40a1b643fb02",
|
||||
"_spec": "read-pkg-up@^1.0.1",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/meow",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/read-pkg-up/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"find-up": "^1.0.0",
|
||||
"read-pkg": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Read the closest package.json file",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/read-pkg-up#readme",
|
||||
"keywords": [
|
||||
"json",
|
||||
"read",
|
||||
"parse",
|
||||
"file",
|
||||
"fs",
|
||||
"graceful",
|
||||
"load",
|
||||
"pkg",
|
||||
"package",
|
||||
"find",
|
||||
"up",
|
||||
"find-up",
|
||||
"findup",
|
||||
"look-up",
|
||||
"look",
|
||||
"file",
|
||||
"search",
|
||||
"match",
|
||||
"package",
|
||||
"resolve",
|
||||
"parent",
|
||||
"parents",
|
||||
"folder",
|
||||
"directory",
|
||||
"dir",
|
||||
"walk",
|
||||
"walking",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "read-pkg-up",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/read-pkg-up.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
||||
79
node_modules/meow/node_modules/read-pkg-up/readme.md
generated
vendored
Normal file
79
node_modules/meow/node_modules/read-pkg-up/readme.md
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
# read-pkg-up [](https://travis-ci.org/sindresorhus/read-pkg-up)
|
||||
|
||||
> Read the closest package.json file
|
||||
|
||||
|
||||
## Why
|
||||
|
||||
- [Finds the closest package.json](https://github.com/sindresorhus/find-up)
|
||||
- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
|
||||
- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
|
||||
- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
|
||||
- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save read-pkg-up
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var readPkgUp = require('read-pkg-up');
|
||||
|
||||
readPkgUp().then(function (result) {
|
||||
console.log(result);
|
||||
/*
|
||||
{
|
||||
pkg: {
|
||||
name: 'awesome-package',
|
||||
version: '1.0.0',
|
||||
...
|
||||
},
|
||||
path: '/Users/sindresorhus/dev/awesome-package'
|
||||
}
|
||||
*/
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### readPkgUp([options])
|
||||
|
||||
Returns a promise that resolves to a result object.
|
||||
|
||||
### readPkgUp.sync([options])
|
||||
|
||||
Returns a result object.
|
||||
|
||||
#### options
|
||||
|
||||
##### cwd
|
||||
|
||||
Type: `string`
|
||||
Default: `.`
|
||||
|
||||
Directory to start looking for a package.json file.
|
||||
|
||||
##### normalize
|
||||
|
||||
Type: `boolean`
|
||||
Default: `true`
|
||||
|
||||
[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file
|
||||
- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories
|
||||
- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
48
node_modules/meow/node_modules/read-pkg/index.js
generated
vendored
Normal file
48
node_modules/meow/node_modules/read-pkg/index.js
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var loadJsonFile = require('load-json-file');
|
||||
var normalizePackageData = require('normalize-package-data');
|
||||
var pathType = require('path-type');
|
||||
|
||||
module.exports = function (fp, opts) {
|
||||
if (typeof fp !== 'string') {
|
||||
opts = fp;
|
||||
fp = '.';
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
return pathType.dir(fp)
|
||||
.then(function (isDir) {
|
||||
if (isDir) {
|
||||
fp = path.join(fp, 'package.json');
|
||||
}
|
||||
|
||||
return loadJsonFile(fp);
|
||||
})
|
||||
.then(function (x) {
|
||||
if (opts.normalize !== false) {
|
||||
normalizePackageData(x);
|
||||
}
|
||||
|
||||
return x;
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = function (fp, opts) {
|
||||
if (typeof fp !== 'string') {
|
||||
opts = fp;
|
||||
fp = '.';
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp;
|
||||
|
||||
var x = loadJsonFile.sync(fp);
|
||||
|
||||
if (opts.normalize !== false) {
|
||||
normalizePackageData(x);
|
||||
}
|
||||
|
||||
return x;
|
||||
};
|
||||
21
node_modules/meow/node_modules/read-pkg/license
generated
vendored
Normal file
21
node_modules/meow/node_modules/read-pkg/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.
|
||||
74
node_modules/meow/node_modules/read-pkg/package.json
generated
vendored
Normal file
74
node_modules/meow/node_modules/read-pkg/package.json
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"_from": "read-pkg@^1.0.0",
|
||||
"_id": "read-pkg@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
|
||||
"_location": "/meow/read-pkg",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "read-pkg@^1.0.0",
|
||||
"name": "read-pkg",
|
||||
"escapedName": "read-pkg",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/meow/read-pkg-up"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
|
||||
"_shasum": "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28",
|
||||
"_spec": "read-pkg@^1.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/meow/node_modules/read-pkg-up",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/read-pkg/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"load-json-file": "^1.0.0",
|
||||
"normalize-package-data": "^2.3.2",
|
||||
"path-type": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Read a package.json file",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/read-pkg#readme",
|
||||
"keywords": [
|
||||
"json",
|
||||
"read",
|
||||
"parse",
|
||||
"file",
|
||||
"fs",
|
||||
"graceful",
|
||||
"load",
|
||||
"pkg",
|
||||
"package",
|
||||
"normalize"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "read-pkg",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/read-pkg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
||||
79
node_modules/meow/node_modules/read-pkg/readme.md
generated
vendored
Normal file
79
node_modules/meow/node_modules/read-pkg/readme.md
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
# read-pkg [](https://travis-ci.org/sindresorhus/read-pkg)
|
||||
|
||||
> Read a package.json file
|
||||
|
||||
|
||||
## Why
|
||||
|
||||
- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
|
||||
- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
|
||||
- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
|
||||
- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save read-pkg
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var readPkg = require('read-pkg');
|
||||
|
||||
readPkg().then(function (pkg) {
|
||||
console.log(pkg);
|
||||
//=> {name: 'read-pkg', ...}
|
||||
});
|
||||
|
||||
readPkg(__dirname).then(function (pkg) {
|
||||
console.log(pkg);
|
||||
//=> {name: 'read-pkg', ...}
|
||||
});
|
||||
|
||||
readPkg(path.join('unicorn', 'package.json')).then(function (pkg) {
|
||||
console.log(pkg);
|
||||
//=> {name: 'read-pkg', ...}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### readPkg([path], [options])
|
||||
|
||||
Returns a promise that resolves to the parsed JSON.
|
||||
|
||||
### readPkg.sync([path], [options])
|
||||
|
||||
Returns the parsed JSON.
|
||||
|
||||
#### path
|
||||
|
||||
Type: `string`
|
||||
Default: `.`
|
||||
|
||||
Path to a `package.json` file or its directory.
|
||||
|
||||
#### options
|
||||
|
||||
##### normalize
|
||||
|
||||
Type: `boolean`
|
||||
Default: `true`
|
||||
|
||||
[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file
|
||||
- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file
|
||||
- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
17
node_modules/meow/node_modules/strip-bom/index.js
generated
vendored
Normal file
17
node_modules/meow/node_modules/strip-bom/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
var isUtf8 = require('is-utf8');
|
||||
|
||||
module.exports = function (x) {
|
||||
// Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
|
||||
// conversion translates it to FEFF (UTF-16 BOM)
|
||||
if (typeof x === 'string' && x.charCodeAt(0) === 0xFEFF) {
|
||||
return x.slice(1);
|
||||
}
|
||||
|
||||
if (Buffer.isBuffer(x) && isUtf8(x) &&
|
||||
x[0] === 0xEF && x[1] === 0xBB && x[2] === 0xBF) {
|
||||
return x.slice(3);
|
||||
}
|
||||
|
||||
return x;
|
||||
};
|
||||
21
node_modules/meow/node_modules/strip-bom/license
generated
vendored
Normal file
21
node_modules/meow/node_modules/strip-bom/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.
|
||||
74
node_modules/meow/node_modules/strip-bom/package.json
generated
vendored
Normal file
74
node_modules/meow/node_modules/strip-bom/package.json
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"_from": "strip-bom@^2.0.0",
|
||||
"_id": "strip-bom@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
|
||||
"_location": "/meow/strip-bom",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "strip-bom@^2.0.0",
|
||||
"name": "strip-bom",
|
||||
"escapedName": "strip-bom",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/meow/load-json-file"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
|
||||
"_shasum": "6219a85616520491f35788bdbf1447a99c7e6b0e",
|
||||
"_spec": "strip-bom@^2.0.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/meow/node_modules/load-json-file",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/strip-bom/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"is-utf8": "^0.2.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Strip UTF-8 byte order mark (BOM) from a string/buffer",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/strip-bom#readme",
|
||||
"keywords": [
|
||||
"bom",
|
||||
"strip",
|
||||
"byte",
|
||||
"mark",
|
||||
"unicode",
|
||||
"utf8",
|
||||
"utf-8",
|
||||
"remove",
|
||||
"delete",
|
||||
"trim",
|
||||
"text",
|
||||
"buffer",
|
||||
"string"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "strip-bom",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/strip-bom.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
39
node_modules/meow/node_modules/strip-bom/readme.md
generated
vendored
Normal file
39
node_modules/meow/node_modules/strip-bom/readme.md
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# strip-bom [](https://travis-ci.org/sindresorhus/strip-bom)
|
||||
|
||||
> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string/buffer
|
||||
|
||||
From Wikipedia:
|
||||
|
||||
> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save strip-bom
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var fs = require('fs');
|
||||
var stripBom = require('strip-bom');
|
||||
|
||||
stripBom('\uFEFFunicorn');
|
||||
//=> 'unicorn'
|
||||
|
||||
stripBom(fs.readFileSync('unicorn.txt'));
|
||||
//=> 'unicorn'
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module
|
||||
- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
98
node_modules/meow/package.json
generated
vendored
Normal file
98
node_modules/meow/package.json
generated
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
"_from": "meow@^3.3.0",
|
||||
"_id": "meow@3.7.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
||||
"_location": "/meow",
|
||||
"_phantomChildren": {
|
||||
"graceful-fs": "4.2.2",
|
||||
"is-utf8": "0.2.1",
|
||||
"normalize-package-data": "2.5.0",
|
||||
"parse-json": "2.2.0",
|
||||
"pify": "2.3.0",
|
||||
"pinkie-promise": "2.0.1"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "meow@^3.3.0",
|
||||
"name": "meow",
|
||||
"escapedName": "meow",
|
||||
"rawSpec": "^3.3.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.3.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/lpad-align",
|
||||
"/node-sass"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||
"_shasum": "72cb668b425228290abbfa856892587308a801fb",
|
||||
"_spec": "meow@^3.3.0",
|
||||
"_where": "/Users/stefanfejes/Projects/30-seconds-of-python-code/node_modules/lpad-align",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/meow/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"camelcase-keys": "^2.0.0",
|
||||
"decamelize": "^1.1.2",
|
||||
"loud-rejection": "^1.0.0",
|
||||
"map-obj": "^1.0.1",
|
||||
"minimist": "^1.1.3",
|
||||
"normalize-package-data": "^2.3.4",
|
||||
"object-assign": "^4.0.1",
|
||||
"read-pkg-up": "^1.0.1",
|
||||
"redent": "^1.0.0",
|
||||
"trim-newlines": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "CLI app helper",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"execa": "^0.1.1",
|
||||
"indent-string": "^2.1.0",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/meow#readme",
|
||||
"keywords": [
|
||||
"cli",
|
||||
"bin",
|
||||
"util",
|
||||
"utility",
|
||||
"helper",
|
||||
"argv",
|
||||
"command",
|
||||
"line",
|
||||
"meow",
|
||||
"cat",
|
||||
"kitten",
|
||||
"parser",
|
||||
"option",
|
||||
"flags",
|
||||
"input",
|
||||
"cmd",
|
||||
"console"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "meow",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/meow.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "3.7.0"
|
||||
}
|
||||
159
node_modules/meow/readme.md
generated
vendored
Normal file
159
node_modules/meow/readme.md
generated
vendored
Normal file
@ -0,0 +1,159 @@
|
||||
# meow [](https://travis-ci.org/sindresorhus/meow)
|
||||
|
||||
> CLI app helper
|
||||
|
||||

|
||||
|
||||
|
||||
## Features
|
||||
|
||||
- Parses arguments using [minimist](https://github.com/substack/minimist)
|
||||
- Converts flags to [camelCase](https://github.com/sindresorhus/camelcase)
|
||||
- Outputs version when `--version`
|
||||
- Outputs description and supplied help text when `--help`
|
||||
- Makes unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail
|
||||
- Sets the process title to the binary name defined in package.json
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save meow
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
$ ./foo-app.js unicorns --rainbow-cake
|
||||
```
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
const meow = require('meow');
|
||||
const foo = require('./');
|
||||
|
||||
const cli = meow(`
|
||||
Usage
|
||||
$ foo <input>
|
||||
|
||||
Options
|
||||
-r, --rainbow Include a rainbow
|
||||
|
||||
Examples
|
||||
$ foo unicorns --rainbow
|
||||
🌈 unicorns 🌈
|
||||
`, {
|
||||
alias: {
|
||||
r: 'rainbow'
|
||||
}
|
||||
});
|
||||
/*
|
||||
{
|
||||
input: ['unicorns'],
|
||||
flags: {rainbow: true},
|
||||
...
|
||||
}
|
||||
*/
|
||||
|
||||
foo(cli.input[0], cli.flags);
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### meow(options, [minimistOptions])
|
||||
|
||||
Returns an object with:
|
||||
|
||||
- `input` *(array)* - Non-flag arguments
|
||||
- `flags` *(object)* - Flags converted to camelCase
|
||||
- `pkg` *(object)* - The `package.json` object
|
||||
- `help` *(object)* - The help text used with `--help`
|
||||
- `showHelp([code=0])` *(function)* - Show the help text and exit with `code`
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`, `array`, `string`
|
||||
|
||||
Can either be a string/array that is the `help` or an options object.
|
||||
|
||||
##### description
|
||||
|
||||
Type: `string`, `boolean`
|
||||
Default: The package.json `"description"` property
|
||||
|
||||
A description to show above the help text.
|
||||
|
||||
Set it to `false` to disable it altogether.
|
||||
|
||||
##### help
|
||||
|
||||
Type: `string`, `boolean`
|
||||
|
||||
The help text you want shown.
|
||||
|
||||
The input is reindented and starting/ending newlines are trimmed which means you can use a [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/template_strings) without having to care about using the correct amount of indent.
|
||||
|
||||
<del>If it's an array each item will be a line.</del>
|
||||
*(Still supported, but you should use a template literal instead.)*
|
||||
|
||||
The description will be shown above your help text automatically.
|
||||
|
||||
Set it to `false` to disable it altogether.
|
||||
|
||||
##### version
|
||||
|
||||
Type: `string`, `boolean`
|
||||
Default: The package.json `"version"` property
|
||||
|
||||
Set a custom version output.
|
||||
|
||||
Set it to `false` to disable it altogether.
|
||||
|
||||
##### pkg
|
||||
|
||||
Type: `string`, `object`
|
||||
Default: Closest package.json upwards
|
||||
|
||||
Relative path to package.json or as an object.
|
||||
|
||||
##### argv
|
||||
|
||||
Type: `array`
|
||||
Default: `process.argv.slice(2)`
|
||||
|
||||
Custom arguments object.
|
||||
|
||||
#### minimistOptions
|
||||
|
||||
Type: `object`
|
||||
Default: `{}`
|
||||
|
||||
Minimist [options](https://github.com/substack/minimist#var-argv--parseargsargs-opts).
|
||||
|
||||
Keys passed to the minimist `default` option are [decamelized](https://github.com/sindresorhus/decamelize), so you can for example pass in `fooBar: 'baz'` and have it be the default for the `--foo-bar` flag.
|
||||
|
||||
|
||||
## Promises
|
||||
|
||||
Meow will make unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail. Meaning you don't have to manually `.catch()` promises used in your CLI.
|
||||
|
||||
|
||||
## Tips
|
||||
|
||||
See [`chalk`](https://github.com/chalk/chalk) if you want to colorize the terminal output.
|
||||
|
||||
See [`get-stdin`](https://github.com/sindresorhus/get-stdin) if you want to accept input from stdin.
|
||||
|
||||
See [`update-notifier`](https://github.com/yeoman/update-notifier) if you want update notifications.
|
||||
|
||||
See [`configstore`](https://github.com/yeoman/configstore) if you need to persist some data.
|
||||
|
||||
[More useful CLI utilities.](https://github.com/sindresorhus/awesome-nodejs#command-line-utilities)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user