Get a file from a github repository
Grab it from npm
npm install get-github-file
const getGithubFile = require('get-github-file');
getGithubFile('nerdlabs/get-github-file/package.json')
.then(buffer => console.log(buffer.toString('utf-8')));
getGithubFile(uri: string, options?: Options): Promise<Buffer>
uri: A string to identify a file in a github repository
user/repo/path/to/file.txt
options:
- auth: authentication object
- branch: specify a different branch than the repository's
default_branch
(usually master) - client: an instance of the github client.
Built by (c) nerdlabs. Released under the MIT license.