initial commit
This commit is contained in:
21
node_modules/git-config-path/LICENSE
generated
vendored
Normal file
21
node_modules/git-config-path/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
90
node_modules/git-config-path/README.md
generated
vendored
Normal file
90
node_modules/git-config-path/README.md
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
# git-config-path [](https://www.npmjs.com/package/git-config-path) [](https://npmjs.org/package/git-config-path) [](https://npmjs.org/package/git-config-path) [](https://travis-ci.org/jonschlinkert/git-config-path)
|
||||
|
||||
> Resolve the path to the user's local or global .gitconfig.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save git-config-path
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Automatically gets the nearest `.git` config path, starting with the current working directory, then looking in the user's `home` directory.
|
||||
|
||||
```js
|
||||
var gitConfigPath = require('git-config-path')();
|
||||
//=> '/Users/jonschlinkert/dev/git-config-path/.git/config'
|
||||
```
|
||||
|
||||
To force `git-config-path` to only look for a global config path, pass `global`:
|
||||
|
||||
```js
|
||||
var gitConfigPath = require('git-config-path')('global');
|
||||
//=> '/Users/jonschlinkert/.gitconfig'
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [git-branch](https://www.npmjs.com/package/git-branch): Get the current branch from the local git repository. | [homepage](https://github.com/jonschlinkert/git-branch "Get the current branch from the local git repository.")
|
||||
* [git-repo-name](https://www.npmjs.com/package/git-repo-name): Get the repository name from the git remote origin URL. | [homepage](https://github.com/jonschlinkert/git-repo-name "Get the repository name from the git remote origin URL.")
|
||||
* [git-user-name](https://www.npmjs.com/package/git-user-name): Get a user's name from git config at the project or global scope, depending on… [more](https://github.com/jonschlinkert/git-user-name) | [homepage](https://github.com/jonschlinkert/git-user-name "Get a user's name from git config at the project or global scope, depending on what git uses in the current context.")
|
||||
* [git-username](https://www.npmjs.com/package/git-username): Get the username (or 'owner' name) from a git/GitHub remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username "Get the username (or 'owner' name) from a git/GitHub remote origin URL.")
|
||||
* [is-git-url](https://www.npmjs.com/package/is-git-url): Regex to validate that a URL is a git url. | [homepage](https://github.com/jonschlinkert/is-git-url "Regex to validate that a URL is a git url.")
|
||||
* [parse-git-config](https://www.npmjs.com/package/parse-git-config): Parse `.git/config` into a JavaScript object. sync or async. | [homepage](https://github.com/jonschlinkert/parse-git-config "Parse `.git/config` into a JavaScript object. sync or async.")
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [GitHub Profile](https://github.com/jonschlinkert)
|
||||
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
||||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 18, 2018._
|
||||
35
node_modules/git-config-path/index.js
generated
vendored
Normal file
35
node_modules/git-config-path/index.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*!
|
||||
* git-config-path <https://github.com/jonschlinkert/git-config-path>
|
||||
*
|
||||
* Copyright (c) 2015-present, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = function(type, options) {
|
||||
if (typeof type !== 'string') {
|
||||
options = type;
|
||||
type = null;
|
||||
}
|
||||
|
||||
let opts = Object.assign({ cwd: process.cwd(), type }, options);
|
||||
let configPath;
|
||||
|
||||
if (opts.type === 'global') {
|
||||
configPath = path.join(os.homedir(), '.gitconfig');
|
||||
} else {
|
||||
configPath = path.resolve(opts.cwd, '.git/config');
|
||||
}
|
||||
|
||||
if (!fs.existsSync(configPath)) {
|
||||
if (typeof opts.type === 'string') return null;
|
||||
configPath = path.join(os.homedir(), '.config/git/config');
|
||||
}
|
||||
|
||||
return fs.existsSync(configPath) ? configPath : null;
|
||||
};
|
||||
58
node_modules/git-config-path/package.json
generated
vendored
Normal file
58
node_modules/git-config-path/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "git-config-path",
|
||||
"description": "Resolve the path to the user's local or global .gitconfig.",
|
||||
"version": "2.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/git-config-path",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/git-config-path",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/git-config-path/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"mocha": "^5.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
"config",
|
||||
"git",
|
||||
"gitconfig",
|
||||
"global",
|
||||
"path",
|
||||
"resolve"
|
||||
],
|
||||
"verb": {
|
||||
"run": true,
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"git-branch",
|
||||
"git-repo-name",
|
||||
"git-user-name",
|
||||
"git-username",
|
||||
"is-git-url",
|
||||
"parse-git-config"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user