Skip to content

Commit 8e11c2c

Browse files
committed
run verb to generate readme
1 parent 7175d8b commit 8e11c2c

File tree

1 file changed

+68
-29
lines changed

1 file changed

+68
-29
lines changed

README.md

Lines changed: 68 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
# get-file [![NPM version](https://badge.fury.io/js/get-file.svg)](http://badge.fury.io/js/get-file)
1+
# get-file [![NPM version](https://img.shields.io/npm/v/get-file.svg?style=flat)](https://www.npmjs.com/package/get-file) [![NPM monthly downloads](https://img.shields.io/npm/dm/get-file.svg?style=flat)](https://npmjs.org/package/get-file) [![NPM total downloads](https://img.shields.io/npm/dt/get-file.svg?style=flat)](https://npmjs.org/package/get-file) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/get-file.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/get-file)
22

33
> CLI to get a single file from Github repository.
44
5-
## CLI Usage
5+
## CLI
6+
7+
### CLI installation
68

79
Install globally with [npm](https://www.npmjs.com/)
810

911
```sh
10-
$ npm i -g get-file
12+
$ npm install --global get-file
1113
```
1214

15+
### CLI usage
16+
1317
Specify the repo and filename:
1418

1519
```bash
@@ -18,68 +22,103 @@ get-file assemble/assemble README.md
1822

1923
**List files**
2024

21-
To see a list of files for a repo before downloading one:
25+
See a list of files for a repo before downloading one:
2226

2327
```bash
24-
get-file assemble/assemble --list
28+
get-file --list assemble/assemble
2529
```
2630

27-
## API Usage
31+
## API
32+
33+
### API installation
34+
35+
Install with [npm](https://www.npmjs.com/):
2836

2937
```sh
30-
$ npm i get-file --save-dev
38+
$ npm install get-file
3139
```
3240

33-
```js
34-
var client = require('get-file');
35-
```
41+
## API usage
42+
43+
### [get](index.js#L22)
44+
45+
Get an individual file and return a stream in the callback.
3646

3747
**Params**
3848

39-
* `repo` **{String}**: Repository to get list of files.
40-
* `cb` **{Function}**: Function that takes `err` and `files` arguments
49+
* `repo` **{String}**: Repository to get file from.
50+
* `filename` **{String}**: file to get.
51+
* `cb` **{Function}**: Callback function that takes `err` and `res` arguments.
4152

4253
**Example**
4354

4455
```js
45-
client.listFiles('jonschlinkert/get-file', function (err, files) {
56+
var get = require('get-file');
57+
get('jonschlinkert/get-file', 'package.json', function(err, res) {
4658
if (err) return console.error(err);
47-
console.log(files);
59+
var file = fs.createWriteStream('package.json');
60+
res.pipe(file);
4861
});
4962
```
5063

64+
### [.files](index.js#L49)
65+
66+
List the files in a given repository.
67+
5168
**Params**
5269

53-
* `repo` **{String}**: Repository to get file from.
54-
* `filename` **{String}**: file to get.
55-
* `cb` **{Function}**: Callback function that takes `err` and `res` arguments.
70+
* `repo` **{String}**: Repository to get list of files.
71+
* `cb` **{Function}**: Function that takes `err` and `files` arguments
5672

5773
**Example**
5874

5975
```js
60-
client.getFile('jonschlinkert/get-file', 'package.json', function (err, res) {
76+
var get = require('get-file');
77+
get.files('jonschlinkert/get-file', function(err, files) {
6178
if (err) return console.error(err);
62-
var file = fs.createWriteStream('package.json');
63-
res.pipe(file);
79+
console.log(files);
6480
});
6581
```
6682

67-
## Contributing
83+
## Release history
84+
85+
### v1.0.0 - MAJOR BREAKING CHANGES
86+
87+
* the main export is now a function
88+
* `.listFiles` was renamed to `.files`
6889

69-
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/get-file/issues)
90+
## About
91+
92+
### Related projects
93+
94+
* [gists](https://www.npmjs.com/package/gists): Methods for working with the GitHub Gist API. Node.js/JavaScript | [homepage](https://github.com/jonschlinkert/gists "Methods for working with the GitHub Gist API. Node.js/JavaScript")
95+
* [github-base](https://www.npmjs.com/package/github-base): JavaScript wrapper that greatly simplifies working with GitHub's API. | [homepage](https://github.com/jonschlinkert/github-base "JavaScript wrapper that greatly simplifies working with GitHub's API.")
96+
* [github-contributors](https://www.npmjs.com/package/github-contributors): Generate a markdown or JSON list of contributors for a project using the GitHub API. | [homepage](https://github.com/jonschlinkert/github-contributors "Generate a markdown or JSON list of contributors for a project using the GitHub API.")
97+
98+
### Contributing
99+
100+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
101+
102+
### Running tests
103+
104+
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:
105+
106+
```sh
107+
$ npm install && npm test
108+
```
70109

71-
## Author
110+
### Author
72111

73112
**Jon Schlinkert**
74113

75-
+ [github/jonschlinkert](https://github.com/jonschlinkert)
76-
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
114+
* [github/jonschlinkert](https://github.com/jonschlinkert)
115+
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
77116

78-
## License
117+
### License
79118

80-
Copyright © 2015 Jon Schlinkert
81-
Released under the MIT license.
119+
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
120+
Released under the [MIT License](LICENSE).
82121

83122
***
84123

85-
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 01, 2015._
124+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 31, 2017._

0 commit comments

Comments
 (0)