Skip to content

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

License

Notifications You must be signed in to change notification settings

phated/github-download-directory

Repository files navigation

github-download-directory

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

Only works in node 12+

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

About

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

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •