Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/forbeslindesay/gethub
Download a github repository to a folder using the .tar.gz bundle
https://github.com/forbeslindesay/gethub
Last synced: 16 days ago
JSON representation
Download a github repository to a folder using the .tar.gz bundle
- Host: GitHub
- URL: https://github.com/forbeslindesay/gethub
- Owner: ForbesLindesay
- License: mit
- Created: 2013-02-28T16:21:47.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T14:15:23.000Z (about 7 years ago)
- Last Synced: 2024-10-26T21:09:14.089Z (17 days ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 8
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://img.shields.io/travis/ForbesLindesay/gethub/master.svg)](https://travis-ci.org/ForbesLindesay/gethub) [![Dependency Status](https://img.shields.io/david/ForbesLindesay/gethub.svg)](https://david-dm.org/ForbesLindesay/gethub)
# GetHubDownload a github repository to a folder using the .tar.gz bundle
## Installation
$ npm install gethub
## Usage
### Command Line
The following command downloads `gethub` at the `master` tag into the `gethub` folder
$ gethub ForbesLindesay/gethub
### API
```javascript
var join = require('path').join;
var download = require('gethub');download('ForbesLindesay', 'gethub', 'master', join(__dirname, 'gethub'), function (err) {
if (err) throw err;
console.log('downloaded ForbesLindesay/gethub@master into: ' + join(__dirname, 'gethub'));
});
```### Promise API
If you omit the callback, a promise is returned.
```javascript
var join = require('path').join;
var download = require('gethub');download('ForbesLindesay', 'gethub', 'master', join(__dirname, 'gethub'))
.then(function (err) {
console.log('downloaded into: ' + join(__dirname, 'gethub'));
}, function (err) {
console.warn(err.stack);
});
```## License
MIT