Skip to content

Download a github repository to a folder using the .tar.gz bundle

License

Notifications You must be signed in to change notification settings

ForbesLindesay/gethub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Dependency Status

GetHub

Download 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

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.

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

About

Download a github repository to a folder using the .tar.gz bundle

Resources

License

Stars

Watchers

Forks

Packages