Skip to content

Commit 7195159

Browse files
committed
run verb to generate readme
1 parent d9ac63c commit 7195159

File tree

2 files changed

+97
-28
lines changed

2 files changed

+97
-28
lines changed

.verb.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,41 @@
11
## Usage
22

33
```js
4-
var findPkg = require('{%= name %}');
4+
const findPkg = require('{%= name %}');
5+
```
6+
7+
**promise**
8+
9+
```js
10+
findPkg('a/b/c/some/path')
11+
.then(file => console.log(file)) //=> /User/jonschlinkert/dev/a/b/package.json
12+
.catch(console.error);
13+
```
14+
15+
**async-await**
516

6-
findPkg('.', function(err, fp) {
7-
//=> /User/jonschlinkert/dev/find-pkg/package.json
17+
18+
```js
19+
(async function() {
20+
const file = await findPkg('a/b/c/some/path');
21+
console.log(file);
22+
//=> '/Users/jonschlinkert/dev/a/b/package.json'
23+
})();
24+
```
25+
26+
**callback**
27+
28+
```js
29+
findPkg('a/b/c/some/path', function(err, file) {
30+
if (err) throw err;
31+
console.log(file);
32+
//=> '/Users/jonschlinkert/dev/a/b/package.json'
833
});
34+
```
35+
36+
**sync**
937

10-
var fp = findPkg.sync('.');
11-
//=> /User/jonschlinkert/dev/find-pkg/package.json
38+
```js
39+
const file = findPkg.sync('a/b/c/some/path');
40+
//=> '/Users/jonschlinkert/dev/a/b/package.json'
1241
```

README.md

Lines changed: 63 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.
44
5+
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
6+
57
## Install
68

79
Install with [npm](https://www.npmjs.com/):
@@ -13,31 +15,66 @@ $ npm install --save find-pkg
1315
## Usage
1416

1517
```js
16-
var findPkg = require('find-pkg');
18+
const findPkg = require('find-pkg');
19+
```
20+
21+
**promise**
22+
23+
```js
24+
findPkg('a/b/c/some/path')
25+
.then(file => console.log(file)) //=> /User/jonschlinkert/dev/a/b/package.json
26+
.catch(console.error);
27+
```
28+
29+
**async-await**
30+
31+
```js
32+
(async function() {
33+
const file = await findPkg('a/b/c/some/path');
34+
console.log(file);
35+
//=> '/Users/jonschlinkert/dev/a/b/package.json'
36+
})();
37+
```
1738

18-
findPkg('.', function(err, fp) {
19-
//=> /User/jonschlinkert/dev/find-pkg/package.json
39+
**callback**
40+
41+
```js
42+
findPkg('a/b/c/some/path', function(err, file) {
43+
if (err) throw err;
44+
console.log(file);
45+
//=> '/Users/jonschlinkert/dev/a/b/package.json'
2046
});
47+
```
48+
49+
**sync**
2150

22-
var fp = findPkg.sync('.');
23-
//=> /User/jonschlinkert/dev/find-pkg/package.json
51+
```js
52+
const file = findPkg.sync('a/b/c/some/path');
53+
//=> '/Users/jonschlinkert/dev/a/b/package.json'
2454
```
2555

2656
## About
2757

28-
### Related projects
58+
<details>
59+
<summary><strong>Contributing</strong></summary>
2960

30-
* [find-file-up](https://www.npmjs.com/package/find-file-up): Find a file, starting with the given cwd and recursively searching up one directory until… [more](https://github.com/jonschlinkert/find-file-up) | [homepage](https://github.com/jonschlinkert/find-file-up "Find a file, starting with the given cwd and recursively searching up one directory until it's found (or we run out of directories). Async and sync.")
31-
* [load-module-pkg](https://www.npmjs.com/package/load-module-pkg): Load the package.json for any project currently installed in node_modules. | [homepage](https://github.com/jonschlinkert/load-module-pkg "Load the package.json for any project currently installed in node_modules.")
32-
* [load-pkg](https://www.npmjs.com/package/load-pkg): Loads the package.json from the root of the user's current project. | [homepage](https://github.com/jonschlinkert/load-pkg "Loads the package.json from the root of the user's current project.")
33-
* [look-up](https://www.npmjs.com/package/look-up): Faster drop-in replacement for find-up and findup-sync. | [homepage](https://github.com/jonschlinkert/look-up "Faster drop-in replacement for find-up and findup-sync.")
34-
* [module-root](https://www.npmjs.com/package/module-root): Get the resolved path the root (directory) of a package installed in node_modules. | [homepage](https://github.com/jonschlinkert/module-root "Get the resolved path the root (directory) of a package installed in node_modules.")
61+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
3562

36-
### Contributing
63+
</details>
3764

38-
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
65+
<details>
66+
<summary><strong>Running Tests</strong></summary>
67+
68+
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:
69+
70+
```sh
71+
$ npm install && npm test
72+
```
3973

40-
### Building docs
74+
</details>
75+
76+
<details>
77+
<summary><strong>Building docs</strong></summary>
4178

4279
_(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.)_
4380

@@ -47,26 +84,29 @@ To generate the readme, run the following command:
4784
$ npm install -g verbose/verb#dev verb-generate-readme && verb
4885
```
4986

50-
### Running tests
87+
</details>
5188

52-
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:
89+
### Related projects
5390

54-
```sh
55-
$ npm install && npm test
56-
```
91+
You might also be interested in these projects:
92+
93+
* [find-file-up](https://www.npmjs.com/package/find-file-up): Find a file fast, by starting at the given cwd and recursing up one directory… [more](https://github.com/jonschlinkert/find-file-up) | [homepage](https://github.com/jonschlinkert/find-file-up "Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.")
94+
* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/js-cli/node-findup-sync#readme) | [homepage](https://github.com/js-cli/node-findup-sync#readme "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.")
95+
* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules "The directory used by npm for globally installed npm modules.")
5796

5897
### Author
5998

6099
**Jon Schlinkert**
61100

62-
* [github/jonschlinkert](https://github.com/jonschlinkert)
63-
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
101+
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
102+
* [GitHub Profile](https://github.com/jonschlinkert)
103+
* [Twitter Profile](https://twitter.com/jonschlinkert)
64104

65105
### License
66106

67-
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
107+
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
68108
Released under the [MIT License](LICENSE).
69109

70110
***
71111

72-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 20, 2017._
112+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on March 28, 2018._

0 commit comments

Comments
 (0)