github-orgs-packages
Advanced tools
Comparing version
@@ -0,1 +1,7 @@ | ||
#### 1.2.1 (2018-03-20) | ||
##### Documentation Changes | ||
* add install & usage sections to readme ([a14bb6d6](https://github.com/oleg-koval/github-orgs-packages/commit/a14bb6d61f165726e36ceeab7658dacb89913236)) | ||
### 1.2.0 (2018-03-19) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "github-orgs-packages", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Get information for all packages inside of your github organisation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,8 +7,39 @@ # github-orgs-packages  | ||
# Installation | ||
npm: | ||
```sh | ||
GH_AUTH_TOKEN=*** GH_ORG_NAME=*** npm start | ||
$ npm install -S github-orgs-packages | ||
``` | ||
Will produce similar output to: | ||
yarn: | ||
```sh | ||
$ yarn add github-orgs-packages | ||
``` | ||
# Usage | ||
You need to provide following env variables: | ||
``` | ||
GH_AUTH_TOKEN=*** | ||
GH_ORG_NAME=*** | ||
``` | ||
Code: | ||
```js | ||
const githubOrgsPackages = require('github-orgs-packages'); | ||
const myOrgPackages = githubOrgsPackages() | ||
myOrgPackages | ||
.then((packages) => { | ||
// do smth with packages | ||
}) | ||
.catch((error) => { | ||
// do smth with error | ||
}) | ||
``` | ||
It will return similar output format to: | ||
```json | ||
@@ -15,0 +46,0 @@ [ |
62862
0.99%92
50.82%