github-getter
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -21,4 +21,2 @@ 'use strict'; | ||
if (config.getData) { | ||
console.log('>>> reponame', repoName); | ||
console.log('>>> filepath', filePath); | ||
(0, _gHRequest2.default)('/repos/' + repoName + '/contents/' + filePath, function (err, file) { | ||
@@ -25,0 +23,0 @@ if (err) { |
{ | ||
"name": "github-getter", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Quick and easy github file retrieval", | ||
@@ -5,0 +5,0 @@ "main": "lib/gHGetter.js", |
@@ -29,3 +29,11 @@ [![codecov.io](https://codecov.io/github/des-des/github-getter/coverage.svg?branch=master)](https://codecov.io/github/des-des/github-getter?branch=master) [![bitHound Overall Score](https://www.bithound.io/github/des-des/github-getter/badges/score.svg)](https://www.bithound.io/github/des-des/github-getter) [![bitHound Dependencies](https://www.bithound.io/github/des-des/github-getter/badges/dependencies.svg)](https://www.bithound.io/github/des-des/github-getter/master/dependencies/npm) [![bitHound Dev Dependencies](https://www.bithound.io/github/des-des/github-getter/badges/devDependencies.svg)](https://www.bithound.io/github/des-des/github-getter/master/dependencies/npm) | ||
1. navigate to `https://github.com/settings/tokens` | ||
2. click this button to create new token | ||
![image](https://cloud.githubusercontent.com/assets/12845233/12928897/04595204-cf68-11e5-8a4a-d41f5eca6a97.png) | ||
3. create a file called `config.env` in your projects root | ||
4. add the line `ghtoken=****************` to the file, adding you token. | ||
5. run the command `npm i github-getter --save` | ||
6. get coding! | ||
```javascript | ||
@@ -40,2 +48,3 @@ import { gHUser, gHRepo } from 'github-getter.js'; | ||
getData: console.log | ||
// logs the file from https://github.com/dwyl/adoro/blob/master/README.md to the console | ||
}) | ||
@@ -49,3 +58,4 @@ }); | ||
files['.babelrc']({ | ||
getData: (err, fileData) => console.log(fileData) | ||
getData: console.log | ||
// logs the file from https://github.com/des-des/aibox/blob/master/.babelrc to the console | ||
}); | ||
@@ -55,7 +65,8 @@ }, | ||
getData: console.log | ||
// logs the file from https://github.com/des-des/aibox/blob/master/README.md to the console | ||
}) | ||
}); | ||
``` | ||
see src/index.es6 for an example! | ||
see src/index.es6 for the example! | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15705
69
386