mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-17 15:53:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
145
node_modules/get-pkg-repo/README.md
generated
vendored
Normal file
145
node_modules/get-pkg-repo/README.md
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url]
|
||||
|
||||
> Get normalized repository from package json data
|
||||
|
||||
|
||||
## Synopsis
|
||||
|
||||
People write different formats of repository url in package.json and sometimes there is even a typo.
|
||||
|
||||
This module extracts the code from [npm/repo](https://github.com/npm/npm/blob/master/lib/repo.js), and uses [normalize-package-data](https://github.com/npm/normalize-package-data), [hosted-git-info](https://github.com/npm/hosted-git-info) and [parse-github-repo-url](https://github.com/repo-utils/parse-github-repo-url) to parse data. Please check them out for more details.
|
||||
|
||||
**This module can fix some common [typos](typos.json).**
|
||||
|
||||
**If you find your normalized repository is not correct, It's most likely the underlying deps' problem. Please try to triage the problem before you open an issue here.**
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save get-pkg-repo
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var fs = require('fs');
|
||||
var getPkgRepo = require('get-pkg-repo');
|
||||
|
||||
fs.readFile('package.json', function(err, pkgData) {
|
||||
if (err) {
|
||||
...
|
||||
}
|
||||
|
||||
var repo = getPkgRepo(pkgData);
|
||||
console.log(repo)
|
||||
/*=>
|
||||
{ type: 'github',
|
||||
protocols: [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
|
||||
domain: 'github.com',
|
||||
treepath: 'tree',
|
||||
filetemplate: 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}',
|
||||
bugstemplate: 'https://{domain}/{user}/{project}/issues',
|
||||
gittemplate: 'git://{auth@}{domain}/{user}/{project}.git{#committish}',
|
||||
sshtemplate: 'git@{domain}:{user}/{project}.git{#committish}',
|
||||
sshurltemplate: 'git+ssh://git@{domain}/{user}/{project}.git{#committish}',
|
||||
browsetemplate: 'https://{domain}/{user}/{project}{/tree/committish}',
|
||||
docstemplate: 'https://{domain}/{user}/{project}{/tree/committish}#readme',
|
||||
httpstemplate: 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}',
|
||||
shortcuttemplate: '{type}:{user}/{project}{#committish}',
|
||||
pathtemplate: '{user}/{project}{#committish}',
|
||||
pathmatch: /^[\/]([^\/]+)[\/]([^\/]+?)(?:[.]git)?$/,
|
||||
protocols_re: /^(git|http|git\+ssh|git\+https|ssh|https):$/,
|
||||
user: 'stevemao',
|
||||
auth: null,
|
||||
project: 'get-pkg-repo',
|
||||
committish: null,
|
||||
default: 'https' }
|
||||
*/
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
getPkgRepo(pkgData, [fixTypo])
|
||||
|
||||
Returns a hosted-git-info returned object if it matches a git host. If not returns a `url.parse` object with a `browse` function which returns the url that can be browsed.
|
||||
|
||||
### pkgData
|
||||
|
||||
Type: `object` or `json`
|
||||
|
||||
Package.json data
|
||||
|
||||
### fixTypo
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
If you want to fix your typical typos automatically, pass true. See [the list of predefined typos](typos.json).
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```sh
|
||||
$ npm install --global get-pkg-repo
|
||||
```
|
||||
|
||||
You can use cli to see what your url will look like after being parsed.
|
||||
|
||||
You can enter interactive mode by typing
|
||||
|
||||
```sh
|
||||
$ get-pkg-repo
|
||||
https://github.com/stevemao/get-pkg-repo
|
||||
{ type: 'github',
|
||||
protocols: [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
|
||||
domain: 'github.com',
|
||||
treepath: 'tree',
|
||||
filetemplate: 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}',
|
||||
bugstemplate: 'https://{domain}/{user}/{project}/issues',
|
||||
gittemplate: 'git://{auth@}{domain}/{user}/{project}.git{#committish}',
|
||||
sshtemplate: 'git@{domain}:{user}/{project}.git{#committish}',
|
||||
sshurltemplate: 'git+ssh://git@{domain}/{user}/{project}.git{#committish}',
|
||||
browsetemplate: 'https://{domain}/{user}/{project}{/tree/committish}',
|
||||
docstemplate: 'https://{domain}/{user}/{project}{/tree/committish}#readme',
|
||||
httpstemplate: 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}',
|
||||
shortcuttemplate: '{type}:{user}/{project}{#committish}',
|
||||
pathtemplate: '{user}/{project}{#committish}',
|
||||
pathmatch: /^[\/]([^\/]+)[\/]([^\/]+?)(?:[.]git)?$/,
|
||||
protocols_re: /^(git|http|git\+ssh|git\+https|ssh|https):$/,
|
||||
user: 'stevemao',
|
||||
auth: null,
|
||||
project: 'get-pkg-repo',
|
||||
committish: null,
|
||||
default: 'https' }
|
||||
```
|
||||
|
||||
You can also validate the repository url in your package.json by using the command followed by a package.json path. You can specify more than one path at a time.
|
||||
|
||||
```sh
|
||||
$ get-pkg-repo package.json
|
||||
{ type: 'github',
|
||||
protocols: [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
|
||||
...
|
||||
# or
|
||||
$ cat package.json | get-pkg-repo --fix-typo
|
||||
{ type: 'github',
|
||||
protocols: [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Steve Mao](https://github.com/stevemao)
|
||||
|
||||
[npm-image]: https://badge.fury.io/js/get-pkg-repo.svg
|
||||
[npm-url]: https://npmjs.org/package/get-pkg-repo
|
||||
[travis-image]: https://travis-ci.org/stevemao/get-pkg-repo.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/stevemao/get-pkg-repo
|
||||
[daviddm-image]: https://david-dm.org/stevemao/get-pkg-repo.svg?theme=shields.io
|
||||
[daviddm-url]: https://david-dm.org/stevemao/get-pkg-repo
|
||||
[coveralls-image]: https://coveralls.io/repos/stevemao/get-pkg-repo/badge.svg
|
||||
[coveralls-url]: https://coveralls.io/r/stevemao/get-pkg-repo
|
||||
82
node_modules/get-pkg-repo/cli.js
generated
vendored
Executable file
82
node_modules/get-pkg-repo/cli.js
generated
vendored
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var fs = require('fs');
|
||||
var getPkgRepo = require('./');
|
||||
var meow = require('meow');
|
||||
var through = require('through2');
|
||||
var util = require('util');
|
||||
|
||||
var cli = meow({
|
||||
help: [
|
||||
'Practice writing repoitory url or validate the repository in a package.json file.',
|
||||
'If used without specifying a package.json file path, you will enter an interactive shell.',
|
||||
'Otherwise, the repository info in package.json is printed.',
|
||||
'',
|
||||
'Usage',
|
||||
' get-pkg-repo',
|
||||
' get-pkg-repo <path> [<path> ...]',
|
||||
' cat <path> | get-pkg-repo',
|
||||
'',
|
||||
'Examples',
|
||||
' get-pkg-repo',
|
||||
' get-pkg-repo package.json',
|
||||
' cat package.json | get-pkg-repo --fix-typo',
|
||||
'',
|
||||
'Options',
|
||||
' -f, --fix-typo Fix your typical typos automatically'
|
||||
]
|
||||
});
|
||||
|
||||
var fixTypo = cli.flags.fixTypo;
|
||||
var input = cli.input;
|
||||
|
||||
if (process.stdin.isTTY) {
|
||||
if (input.length > 0) {
|
||||
input.forEach(function(path) {
|
||||
var repo;
|
||||
fs.readFile(path, 'utf8', function(err, data) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
repo = getPkgRepo(data, fixTypo);
|
||||
console.log(repo);
|
||||
} catch (e) {
|
||||
console.error(path + ': ' + e.toString());
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
process.stdin
|
||||
.pipe(through.obj(function(chunk, enc, cb) {
|
||||
var repo;
|
||||
var pkgData = {
|
||||
repository: chunk.toString()
|
||||
};
|
||||
|
||||
try {
|
||||
repo = getPkgRepo(pkgData, fixTypo);
|
||||
cb(null, util.format(repo) + '\n');
|
||||
} catch (e) {
|
||||
console.error(e.toString());
|
||||
cb();
|
||||
}
|
||||
}))
|
||||
.pipe(process.stdout);
|
||||
}
|
||||
} else {
|
||||
process.stdin
|
||||
.pipe(through.obj(function(chunk, enc, cb) {
|
||||
var repo;
|
||||
try {
|
||||
repo = getPkgRepo(chunk.toString(), fixTypo);
|
||||
} catch (e) {
|
||||
console.error(e.toString());
|
||||
process.exit(1);
|
||||
}
|
||||
cb(null, util.format(repo) + '\n');
|
||||
}))
|
||||
.pipe(process.stdout);
|
||||
}
|
||||
85
node_modules/get-pkg-repo/index.js
generated
vendored
Normal file
85
node_modules/get-pkg-repo/index.js
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
'use strict';
|
||||
var parseSlug = require('parse-github-repo-url');
|
||||
var normalizeData = require('normalize-package-data');
|
||||
var hostedGitInfo = require('hosted-git-info');
|
||||
var url = require('url');
|
||||
var typos = require('./typos');
|
||||
|
||||
var gitAt = /^git@/;
|
||||
|
||||
function gitAtToHttpsUrl(repoUrl) {
|
||||
repoUrl = repoUrl.replace(':', '/');
|
||||
repoUrl = repoUrl.replace(gitAt, 'https://');
|
||||
return repoUrl;
|
||||
}
|
||||
|
||||
function parseRepoUrl(repoUrl) {
|
||||
var parsed = url.parse(repoUrl);
|
||||
if (!parsed.host) {
|
||||
var gitAt = /^git@/;
|
||||
if (gitAt.test(repoUrl)) {
|
||||
parsed = url.parse(gitAtToHttpsUrl(repoUrl));
|
||||
}
|
||||
}
|
||||
return parsed;
|
||||
}
|
||||
|
||||
function getType(repoUrl) {
|
||||
if (repoUrl.indexOf('github') !== -1) {
|
||||
return 'github';
|
||||
}
|
||||
if (repoUrl.indexOf('gitlab') !== -1) {
|
||||
return 'gitlab';
|
||||
}
|
||||
}
|
||||
|
||||
function unknownHostedInfo(repoUrl) {
|
||||
var parsed = parseRepoUrl(repoUrl);
|
||||
var protocol = parsed.protocol === 'https:' ? 'https:' : 'http:';
|
||||
var browseUrl = protocol + '//' + (parsed.host || '') + parsed.path.replace(/\.git$/, '').replace(/\/$/, '');
|
||||
|
||||
var UnknownGitHost = function() {
|
||||
var slug = parseSlug(repoUrl);
|
||||
|
||||
if (parsed.host) {
|
||||
this.domain = parsed.host;
|
||||
}
|
||||
|
||||
this.user = slug[0];
|
||||
this.project = slug[1];
|
||||
|
||||
this.type = getType(repoUrl);
|
||||
};
|
||||
|
||||
UnknownGitHost.prototype.browse = function() {
|
||||
return browseUrl;
|
||||
};
|
||||
|
||||
return new UnknownGitHost();
|
||||
}
|
||||
|
||||
function getPkgRepo(pkgData, fixTypo) {
|
||||
try {
|
||||
pkgData = JSON.parse(pkgData);
|
||||
} catch (err) {}
|
||||
|
||||
if (fixTypo && !pkgData.repository) {
|
||||
typos.forEach(function(val) {
|
||||
if (pkgData[val]) {
|
||||
pkgData.repository = pkgData[val];
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
normalizeData(pkgData);
|
||||
|
||||
var repo = pkgData.repository;
|
||||
if (!repo || !repo.url) {
|
||||
throw new Error('No "repository" field found in your package.json file.' +
|
||||
' Please see https://docs.npmjs.com/files/package.json#repository for proper syntax.');
|
||||
}
|
||||
|
||||
return hostedGitInfo.fromUrl(repo.url) || unknownHostedInfo(repo.url);
|
||||
}
|
||||
|
||||
module.exports = getPkgRepo;
|
||||
12
node_modules/get-pkg-repo/node_modules/camelcase-keys/index.js
generated
vendored
Normal file
12
node_modules/get-pkg-repo/node_modules/camelcase-keys/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
var mapObj = require('map-obj');
|
||||
var camelCase = require('camelcase');
|
||||
|
||||
module.exports = function (input, options) {
|
||||
options = options || {};
|
||||
var exclude = options.exclude || [];
|
||||
return mapObj(input, function (key, val) {
|
||||
key = exclude.indexOf(key) === -1 ? camelCase(key) : key;
|
||||
return [key, val];
|
||||
});
|
||||
};
|
||||
21
node_modules/get-pkg-repo/node_modules/camelcase-keys/license
generated
vendored
Normal file
21
node_modules/get-pkg-repo/node_modules/camelcase-keys/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.
|
||||
52
node_modules/get-pkg-repo/node_modules/camelcase-keys/package.json
generated
vendored
Normal file
52
node_modules/get-pkg-repo/node_modules/camelcase-keys/package.json
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "camelcase-keys",
|
||||
"version": "2.1.0",
|
||||
"description": "Convert object keys to camelCase",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/camelcase-keys",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"map",
|
||||
"obj",
|
||||
"object",
|
||||
"key",
|
||||
"keys",
|
||||
"value",
|
||||
"values",
|
||||
"val",
|
||||
"iterate",
|
||||
"camelcase",
|
||||
"camel-case",
|
||||
"camel",
|
||||
"case",
|
||||
"dash",
|
||||
"hyphen",
|
||||
"dot",
|
||||
"underscore",
|
||||
"separator",
|
||||
"string",
|
||||
"text",
|
||||
"convert"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"camelcase": "^2.0.0",
|
||||
"map-obj": "^1.0.0"
|
||||
}
|
||||
}
|
||||
54
node_modules/get-pkg-repo/node_modules/camelcase-keys/readme.md
generated
vendored
Normal file
54
node_modules/get-pkg-repo/node_modules/camelcase-keys/readme.md
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# camelcase-keys [](https://travis-ci.org/sindresorhus/camelcase-keys)
|
||||
|
||||
> Convert object keys to camelCase using [`camelcase`](https://github.com/sindresorhus/camelcase)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save camelcase-keys
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const camelcaseKeys = require('camelcase-keys');
|
||||
|
||||
camelcaseKeys({'foo-bar': true});
|
||||
//=> {fooBar: true}
|
||||
|
||||
|
||||
const argv = require('minimist')(process.argv.slice(2));
|
||||
//=> {_: [], 'foo-bar': true}
|
||||
|
||||
camelcaseKeys(argv);
|
||||
//=> {_: [], fooBar: true}
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### camelcaseKeys(input, [options])
|
||||
|
||||
#### input
|
||||
|
||||
Type: `object`
|
||||
|
||||
Object to camelCase.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### exclude
|
||||
|
||||
Type: `array`
|
||||
Default: `[]`
|
||||
|
||||
Exclude keys from being camelCased.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
56
node_modules/get-pkg-repo/node_modules/camelcase/index.js
generated
vendored
Normal file
56
node_modules/get-pkg-repo/node_modules/camelcase/index.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
function preserveCamelCase(str) {
|
||||
var isLastCharLower = false;
|
||||
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var c = str.charAt(i);
|
||||
|
||||
if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) {
|
||||
str = str.substr(0, i) + '-' + str.substr(i);
|
||||
isLastCharLower = false;
|
||||
i++;
|
||||
} else {
|
||||
isLastCharLower = (c.toLowerCase() === c);
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
module.exports = function () {
|
||||
var str = [].map.call(arguments, function (str) {
|
||||
return str.trim();
|
||||
}).filter(function (str) {
|
||||
return str.length;
|
||||
}).join('-');
|
||||
|
||||
if (!str.length) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (str.length === 1) {
|
||||
return str;
|
||||
}
|
||||
|
||||
if (!(/[_.\- ]+/).test(str)) {
|
||||
if (str === str.toUpperCase()) {
|
||||
return str.toLowerCase();
|
||||
}
|
||||
|
||||
if (str[0] !== str[0].toLowerCase()) {
|
||||
return str[0].toLowerCase() + str.slice(1);
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
str = preserveCamelCase(str);
|
||||
|
||||
return str
|
||||
.replace(/^[_.\- ]+/, '')
|
||||
.toLowerCase()
|
||||
.replace(/[_.\- ]+(\w|$)/g, function (m, p1) {
|
||||
return p1.toUpperCase();
|
||||
});
|
||||
};
|
||||
21
node_modules/get-pkg-repo/node_modules/camelcase/license
generated
vendored
Normal file
21
node_modules/get-pkg-repo/node_modules/camelcase/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.
|
||||
39
node_modules/get-pkg-repo/node_modules/camelcase/package.json
generated
vendored
Normal file
39
node_modules/get-pkg-repo/node_modules/camelcase/package.json
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "camelcase",
|
||||
"version": "2.1.1",
|
||||
"description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/camelcase",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"camelcase",
|
||||
"camel-case",
|
||||
"camel",
|
||||
"case",
|
||||
"dash",
|
||||
"hyphen",
|
||||
"dot",
|
||||
"underscore",
|
||||
"separator",
|
||||
"string",
|
||||
"text",
|
||||
"convert"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
57
node_modules/get-pkg-repo/node_modules/camelcase/readme.md
generated
vendored
Normal file
57
node_modules/get-pkg-repo/node_modules/camelcase/readme.md
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
# camelcase [](https://travis-ci.org/sindresorhus/camelcase)
|
||||
|
||||
> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save camelcase
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const camelCase = require('camelcase');
|
||||
|
||||
camelCase('foo-bar');
|
||||
//=> 'fooBar'
|
||||
|
||||
camelCase('foo_bar');
|
||||
//=> 'fooBar'
|
||||
|
||||
camelCase('Foo-Bar');
|
||||
//=> 'fooBar'
|
||||
|
||||
camelCase('--foo.bar');
|
||||
//=> 'fooBar'
|
||||
|
||||
camelCase('__foo__bar__');
|
||||
//=> 'fooBar'
|
||||
|
||||
camelCase('foo bar');
|
||||
//=> 'fooBar'
|
||||
|
||||
console.log(process.argv[3]);
|
||||
//=> '--foo-bar'
|
||||
camelCase(process.argv[3]);
|
||||
//=> 'fooBar'
|
||||
|
||||
camelCase('foo', 'bar');
|
||||
//=> 'fooBar'
|
||||
|
||||
camelCase('__foo__', '--bar');
|
||||
//=> 'fooBar'
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module
|
||||
- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
82
node_modules/get-pkg-repo/node_modules/meow/index.js
generated
vendored
Normal file
82
node_modules/get-pkg-repo/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/get-pkg-repo/node_modules/meow/license
generated
vendored
Normal file
21
node_modules/get-pkg-repo/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.
|
||||
58
node_modules/get-pkg-repo/node_modules/meow/package.json
generated
vendored
Normal file
58
node_modules/get-pkg-repo/node_modules/meow/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "meow",
|
||||
"version": "3.7.0",
|
||||
"description": "CLI app helper",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/meow",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"cli",
|
||||
"bin",
|
||||
"util",
|
||||
"utility",
|
||||
"helper",
|
||||
"argv",
|
||||
"command",
|
||||
"line",
|
||||
"meow",
|
||||
"cat",
|
||||
"kitten",
|
||||
"parser",
|
||||
"option",
|
||||
"flags",
|
||||
"input",
|
||||
"cmd",
|
||||
"console"
|
||||
],
|
||||
"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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"execa": "^0.1.1",
|
||||
"indent-string": "^2.1.0",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
159
node_modules/get-pkg-repo/node_modules/meow/readme.md
generated
vendored
Normal file
159
node_modules/get-pkg-repo/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)
|
||||
7
node_modules/get-pkg-repo/node_modules/redent/index.js
generated
vendored
Normal file
7
node_modules/get-pkg-repo/node_modules/redent/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
var stripIndent = require('strip-indent');
|
||||
var indentString = require('indent-string');
|
||||
|
||||
module.exports = function (str, count, indent) {
|
||||
return indentString(stripIndent(str), indent || ' ', count || 0);
|
||||
};
|
||||
21
node_modules/get-pkg-repo/node_modules/redent/license
generated
vendored
Normal file
21
node_modules/get-pkg-repo/node_modules/redent/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.
|
||||
1
node_modules/get-pkg-repo/node_modules/redent/node_modules/.bin/strip-indent
generated
vendored
Symbolic link
1
node_modules/get-pkg-repo/node_modules/redent/node_modules/.bin/strip-indent
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../strip-indent/cli.js
|
||||
43
node_modules/get-pkg-repo/node_modules/redent/package.json
generated
vendored
Normal file
43
node_modules/get-pkg-repo/node_modules/redent/package.json
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "redent",
|
||||
"version": "1.0.0",
|
||||
"description": "Strip redundant indentation and indent the string",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/redent",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"string",
|
||||
"str",
|
||||
"strip",
|
||||
"trim",
|
||||
"indent",
|
||||
"indentation",
|
||||
"add",
|
||||
"reindent",
|
||||
"normalize",
|
||||
"remove",
|
||||
"whitespace",
|
||||
"space"
|
||||
],
|
||||
"dependencies": {
|
||||
"indent-string": "^2.1.0",
|
||||
"strip-indent": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
48
node_modules/get-pkg-repo/node_modules/redent/readme.md
generated
vendored
Normal file
48
node_modules/get-pkg-repo/node_modules/redent/readme.md
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# redent [](https://travis-ci.org/sindresorhus/redent)
|
||||
|
||||
> [Strip redundant indentation](https://github.com/sindresorhus/strip-indent) and [indent the string](https://github.com/sindresorhus/indent-string)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save redent
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const redent = require('redent');
|
||||
|
||||
redent('\n foo\n bar\n', 1);
|
||||
//=> '\n foo\n bar\n'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### redent(input, [count], [indent])
|
||||
|
||||
#### input
|
||||
|
||||
Type: `string`
|
||||
|
||||
#### count
|
||||
|
||||
Type: `number`
|
||||
Default: `0`
|
||||
|
||||
How many times you want `indent` repeated.
|
||||
|
||||
#### indent
|
||||
|
||||
Type: `string`
|
||||
Default: `' '`
|
||||
|
||||
The string to use for the indent.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
49
node_modules/get-pkg-repo/node_modules/strip-indent/cli.js
generated
vendored
Executable file
49
node_modules/get-pkg-repo/node_modules/strip-indent/cli.js
generated
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var fs = require('fs');
|
||||
var stdin = require('get-stdin');
|
||||
var pkg = require('./package.json');
|
||||
var stripIndent = require('./');
|
||||
var argv = process.argv.slice(2);
|
||||
var input = argv[0];
|
||||
|
||||
function help() {
|
||||
console.log([
|
||||
'',
|
||||
' ' + pkg.description,
|
||||
'',
|
||||
' Usage',
|
||||
' strip-indent <file>',
|
||||
' echo <string> | strip-indent',
|
||||
'',
|
||||
' Example',
|
||||
' echo \'\\tunicorn\\n\\t\\tcake\' | strip-indent',
|
||||
' unicorn',
|
||||
' \tcake'
|
||||
].join('\n'));
|
||||
}
|
||||
|
||||
function init(data) {
|
||||
console.log(stripIndent(data));
|
||||
}
|
||||
|
||||
if (argv.indexOf('--help') !== -1) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
if (argv.indexOf('--version') !== -1) {
|
||||
console.log(pkg.version);
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.stdin.isTTY) {
|
||||
if (!input) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
init(fs.readFileSync(input, 'utf8'));
|
||||
} else {
|
||||
stdin(init);
|
||||
}
|
||||
16
node_modules/get-pkg-repo/node_modules/strip-indent/index.js
generated
vendored
Normal file
16
node_modules/get-pkg-repo/node_modules/strip-indent/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
module.exports = function (str) {
|
||||
var match = str.match(/^[ \t]*(?=\S)/gm);
|
||||
|
||||
if (!match) {
|
||||
return str;
|
||||
}
|
||||
|
||||
var indent = Math.min.apply(Math, match.map(function (el) {
|
||||
return el.length;
|
||||
}));
|
||||
|
||||
var re = new RegExp('^[ \\t]{' + indent + '}', 'gm');
|
||||
|
||||
return indent > 0 ? str.replace(re, '') : str;
|
||||
};
|
||||
21
node_modules/get-pkg-repo/node_modules/strip-indent/license
generated
vendored
Normal file
21
node_modules/get-pkg-repo/node_modules/strip-indent/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.
|
||||
46
node_modules/get-pkg-repo/node_modules/strip-indent/package.json
generated
vendored
Normal file
46
node_modules/get-pkg-repo/node_modules/strip-indent/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "strip-indent",
|
||||
"version": "1.0.1",
|
||||
"description": "Strip leading whitespace from every line in a string",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/strip-indent",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bin": {
|
||||
"strip-indent": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js"
|
||||
],
|
||||
"keywords": [
|
||||
"cli",
|
||||
"bin",
|
||||
"browser",
|
||||
"strip",
|
||||
"normalize",
|
||||
"remove",
|
||||
"indent",
|
||||
"indentation",
|
||||
"whitespace",
|
||||
"space",
|
||||
"tab",
|
||||
"string",
|
||||
"str"
|
||||
],
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"get-stdin": "^4.0.1"
|
||||
}
|
||||
}
|
||||
61
node_modules/get-pkg-repo/node_modules/strip-indent/readme.md
generated
vendored
Normal file
61
node_modules/get-pkg-repo/node_modules/strip-indent/readme.md
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# strip-indent [](https://travis-ci.org/sindresorhus/strip-indent)
|
||||
|
||||
> Strip leading whitespace from every line in a string
|
||||
|
||||
The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.
|
||||
|
||||
Useful for removing redundant indentation.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save strip-indent
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var str = '\tunicorn\n\t\tcake';
|
||||
/*
|
||||
unicorn
|
||||
cake
|
||||
*/
|
||||
|
||||
stripIndent('\tunicorn\n\t\tcake');
|
||||
/*
|
||||
unicorn
|
||||
cake
|
||||
*/
|
||||
```
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```sh
|
||||
$ npm install --global strip-indent
|
||||
```
|
||||
|
||||
```sh
|
||||
$ strip-indent --help
|
||||
|
||||
Usage
|
||||
strip-indent <file>
|
||||
echo <string> | strip-indent
|
||||
|
||||
Example
|
||||
echo '\tunicorn\n\t\tcake' | strip-indent
|
||||
unicorn
|
||||
cake
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
13
node_modules/get-pkg-repo/node_modules/trim-newlines/index.js
generated
vendored
Normal file
13
node_modules/get-pkg-repo/node_modules/trim-newlines/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var fn = module.exports = function (x) {
|
||||
return fn.end(fn.start(x));
|
||||
};
|
||||
|
||||
fn.start = function (x) {
|
||||
return x.replace(/^[\r\n]+/, '');
|
||||
};
|
||||
|
||||
fn.end = function (x) {
|
||||
return x.replace(/[\r\n]+$/, '');
|
||||
};
|
||||
21
node_modules/get-pkg-repo/node_modules/trim-newlines/license
generated
vendored
Normal file
21
node_modules/get-pkg-repo/node_modules/trim-newlines/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.
|
||||
42
node_modules/get-pkg-repo/node_modules/trim-newlines/package.json
generated
vendored
Normal file
42
node_modules/get-pkg-repo/node_modules/trim-newlines/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "trim-newlines",
|
||||
"version": "1.0.0",
|
||||
"description": "Trim newlines from the start and/or end of a string",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/trim-newlines",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"trim",
|
||||
"newline",
|
||||
"newlines",
|
||||
"linebreak",
|
||||
"lf",
|
||||
"crlf",
|
||||
"left",
|
||||
"right",
|
||||
"start",
|
||||
"end",
|
||||
"string",
|
||||
"str",
|
||||
"remove",
|
||||
"delete",
|
||||
"strip"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
46
node_modules/get-pkg-repo/node_modules/trim-newlines/readme.md
generated
vendored
Normal file
46
node_modules/get-pkg-repo/node_modules/trim-newlines/readme.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# trim-newlines [](https://travis-ci.org/sindresorhus/trim-newlines)
|
||||
|
||||
> Trim [newlines](https://en.wikipedia.org/wiki/Newline) from the start and/or end of a string
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save trim-newlines
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var trimNewlines = require('trim-newlines');
|
||||
|
||||
trimNewlines('\nunicorn\r\n');
|
||||
//=> 'unicorn'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### trimNewlines(input)
|
||||
|
||||
Trim from the start and end of a string.
|
||||
|
||||
### trimNewlines.start(input)
|
||||
|
||||
Trim from the start of a string.
|
||||
|
||||
### trimNewlines.end(input)
|
||||
|
||||
Trim from the end of a string.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [trim-left](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left
|
||||
- [trim-right](https://github.com/sindresorhus/trim-right) - Similar to `String#trim()` but removes only whitespace on the right.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
55
node_modules/get-pkg-repo/package.json
generated
vendored
Normal file
55
node_modules/get-pkg-repo/package.json
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "get-pkg-repo",
|
||||
"version": "1.4.0",
|
||||
"description": "Get normalized repository from package json data",
|
||||
"homepage": "https://github.com/stevemao/get-pkg-repo",
|
||||
"author": {
|
||||
"name": "Steve Mao",
|
||||
"email": "maochenyan@gmail.com",
|
||||
"url": "https://github.com/stevemao"
|
||||
},
|
||||
"repository": "stevemao/get-pkg-repo",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js",
|
||||
"typos.json"
|
||||
],
|
||||
"keywords": [
|
||||
"get-pkg-repo",
|
||||
"normalize",
|
||||
"fix",
|
||||
"typo",
|
||||
"hosted-git-info",
|
||||
"repo",
|
||||
"npm",
|
||||
"git",
|
||||
"info",
|
||||
"url",
|
||||
"package",
|
||||
"pkg",
|
||||
"repository"
|
||||
],
|
||||
"dependencies": {
|
||||
"parse-github-repo-url": "^1.3.0",
|
||||
"hosted-git-info": "^2.1.4",
|
||||
"meow": "^3.3.0",
|
||||
"normalize-package-data": "^2.3.0",
|
||||
"through2": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.2",
|
||||
"istanbul": "^0.4.2",
|
||||
"jscs": "^2.9.0",
|
||||
"jshint": "^2.8.0",
|
||||
"mocha": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "jshint *.js --exclude node_modules && jscs *.js",
|
||||
"test": "npm run-script lint && mocha",
|
||||
"coverage": "istanbul cover _mocha -- -R spec && rm -rf ./coverage"
|
||||
},
|
||||
"bin": {
|
||||
"get-pkg-repo": "cli.js"
|
||||
}
|
||||
}
|
||||
1
node_modules/get-pkg-repo/typos.json
generated
vendored
Normal file
1
node_modules/get-pkg-repo/typos.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
["repostitory", "repostitorys", "repositories", "repostitories", "repositorys", "repo", "repos"]
|
||||
Reference in New Issue
Block a user