run verb to generate readme

master
jonschlinkert 6 years ago
parent eed160620b
commit f3805046c2

@ -57,7 +57,7 @@ Config object will be something like:
## API ## API
### [parse](index.js#L35) ### [parse](index.js#L33)
Asynchronously parse a `.git/config` file. If only the callback is passed, the `.git/config` file relative to `process.cwd()` is used. Asynchronously parse a `.git/config` file. If only the callback is passed, the `.git/config` file relative to `process.cwd()` is used.
@ -76,7 +76,7 @@ parse(function(err, config) {
}); });
``` ```
### [.sync](index.js#L64) ### [.sync](index.js#L62)
Parse the given Parse the given
@ -92,7 +92,7 @@ parse.promise({ path: '/path/to/.gitconfig' })
.then(config => console.log(config)); .then(config => console.log(config));
``` ```
### [.sync](index.js#L98) ### [.sync](index.js#L95)
Synchronously parse a `.git/config` file. If no arguments are passed, the `.git/config` file relative to `process.cwd()` is used. Synchronously parse a `.git/config` file. If no arguments are passed, the `.git/config` file relative to `process.cwd()` is used.
@ -107,7 +107,7 @@ Synchronously parse a `.git/config` file. If no arguments are passed, the `.git/
const config = parse.sync(); const config = parse.sync();
``` ```
### [.expandKeys](index.js#L149) ### [.expandKeys](index.js#L144)
Returns an object with only the properties that had ini-style keys converted to objects. Returns an object with only the properties that had ini-style keys converted to objects.
@ -116,13 +116,17 @@ Returns an object with only the properties that had ini-style keys converted to
* `config` **{Object}**: The parsed git config object. * `config` **{Object}**: The parsed git config object.
* `returns` **{Object}** * `returns` **{Object}**
**Usage Example** **Example**
```js ```js
const config = parse.sync({ path: '/path/to/.gitconfig' }); const config = parse.sync({ path: '/path/to/.gitconfig' });
const obj = parse.expandKeys(config); const obj = parse.expandKeys(config);
``` ```
### .keys examples
Converts ini-style keys into objects:
**Example 1** **Example 1**
```js ```js
@ -132,7 +136,7 @@ const config = {
'foo "baz"': { doStuff: true } 'foo "baz"': { doStuff: true }
}; };
console.log(parse.expandKeys(config)); console.log(parse.keys(config));
``` ```
Results in: Results in:
@ -166,7 +170,7 @@ const config = {
} }
}; };
console.log(parse.expandKeys(config)); console.log(parse.keys(config));
``` ```
Results in: Results in:
@ -231,27 +235,30 @@ $ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects: You might also be interested in these projects:
* [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-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 from a git remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username "Get the username from a git remote origin URL.") * [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.")
* [parse-author](https://www.npmjs.com/package/parse-author): Parse an author, contributor, maintainer or other 'person' string into an object with name, email… [more](https://github.com/jonschlinkert/parse-author) | [homepage](https://github.com/jonschlinkert/parse-author "Parse an author, contributor, maintainer or other 'person' string into an object with name, email and url properties following npm conventions.") * [parse-author](https://www.npmjs.com/package/parse-author): Parse an author, contributor, maintainer or other 'person' string into an object with name, email… [more](https://github.com/jonschlinkert/parse-author) | [homepage](https://github.com/jonschlinkert/parse-author "Parse an author, contributor, maintainer or other 'person' string into an object with name, email and url properties following npm conventions.")
* [parse-authors](https://www.npmjs.com/package/parse-authors): Parse a string into an array of objects with `name`, `email` and `url` properties following… [more](https://github.com/jonschlinkert/parse-authors) | [homepage](https://github.com/jonschlinkert/parse-authors "Parse a string into an array of objects with `name`, `email` and `url` properties following npm conventions. Useful for the `authors` property in package.json or for parsing an AUTHORS file into an array of authors objects.") * [parse-authors](https://www.npmjs.com/package/parse-authors): Parse a string into an array of objects with `name`, `email` and `url` properties following… [more](https://github.com/jonschlinkert/parse-authors) | [homepage](https://github.com/jonschlinkert/parse-authors "Parse a string into an array of objects with `name`, `email` and `url` properties following npm conventions. Useful for the `authors` property in package.json or for parsing an AUTHORS file into an array of authors objects.")
* [parse-github-url](https://www.npmjs.com/package/parse-github-url): Parse a github URL into an object. | [homepage](https://github.com/jonschlinkert/parse-github-url "Parse a github URL into an object.") * [parse-github-url](https://www.npmjs.com/package/parse-github-url): Parse a github URL into an object. | [homepage](https://github.com/jonschlinkert/parse-github-url "Parse a github URL into an object.")
* [parse-gitignore](https://www.npmjs.com/package/parse-gitignore): Parse a gitignore file into an array of patterns. Comments and empty lines are stripped. | [homepage](https://github.com/jonschlinkert/parse-gitignore "Parse a gitignore file into an array of patterns. Comments and empty lines are stripped.") * [parse-gitignore](https://www.npmjs.com/package/parse-gitignore): Parse a .gitignore or .npmignore file into an array of patterns. | [homepage](https://github.com/jonschlinkert/parse-gitignore "Parse a .gitignore or .npmignore file into an array of patterns.")
### Contributors ### Contributors
| **Commits** | **Contributor** | | **Commits** | **Contributor** |
| --- | --- | | --- | --- |
| 51 | [jonschlinkert](https://github.com/jonschlinkert) | | 63 | [jonschlinkert](https://github.com/jonschlinkert) |
| 4 | [doowb](https://github.com/doowb) |
| 1 | [daviwil](https://github.com/daviwil) |
| 1 | [LexSwed](https://github.com/LexSwed) |
| 1 | [sam3d](https://github.com/sam3d) | | 1 | [sam3d](https://github.com/sam3d) |
| 1 | [js-n](https://github.com/js-n) | | 1 | [suarasaur](https://github.com/suarasaur) |
### Author ### Author
**Jon Schlinkert** **Jon Schlinkert**
* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) * [GitHub Profile](https://github.com/jonschlinkert)
* [github/jonschlinkert](https://github.com/jonschlinkert) * [Twitter Profile](https://twitter.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) * [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
### License ### License
@ -260,4 +267,4 @@ Released under the [MIT License](LICENSE).
*** ***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 14, 2018._ _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 19, 2018._
Loading…
Cancel
Save