Socket
Book a DemoInstallSign in
Socket

gethub

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gethub

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

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source
[![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) # 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

Keywords

github

FAQs

Package last updated on 11 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts