github-download-directory
Download the contents of a given directory from a repository on GitHub.
Last updated 7 months ago by phated .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install github-download-directory 
SYNC missed versions from official npm registry.

github-download-directory

Download the contents of a given directory from a repository on GitHub.

Only works in node 10.13+

Usage

Best used from the command line:

> github-download-directory gulpjs/gulp docs

Or programatic:

var downloader = require('github-download-directory');

downloader.download('gulpjs', 'gulp', 'docs').then(console.log, console.error);

You can also construct a downloader instance:

var { Downloader } = require('github-download-directory');

// You can even include custom cache stores compatible with https://www.npmjs.com/package/keyv
var KeyvFile = require('keyv-file').KeyvFile;
var store = new KeyvFile();

var custom = new Downloader({
  cache: { store },
  github: { auth: 'SOME_AUTH_TOKEN' },
});

custom.download('gulpjs', 'gulp', 'docs').then(console.log, console.error);

License

MIT

Current Tags

  • 2.0.0                                ...           latest (7 months ago)

5 Versions

  • 2.0.0                                ...           7 months ago
  • 1.2.0                                ...           9 months ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |