gethub

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

MIT 6 个版本
安装
npm install gethub
yarn add gethub
pnpm add gethub
bun add gethub
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) # 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

版本列表
2.0.2 2016-01-11
2.0.1 2014-07-08
2.0.0 2014-07-08
1.0.2 2013-04-16
1.0.1 2013-03-17
1.0.0 2013-02-28