Download and extract all assets of a GitHub release.
Using the CLI:
$ cd ~/dev/Level/leveldown
$ gh-release-download dist/
...
$ ls dist/
...
Using the API:
const download = require('gh-release-download')
// point to your local checkout of a repository
const downloader = download({
dir: process.env.HOME + '/dev/level/leveldown'
})
downloader.events.on('start', name => console.log(`${name}...`))
downloader.events.on('finish', name => console.log(name))
downloader
.then(() => console.log('All downloaded'))
.catch(err => console.error(err))
For CLI:
$ npm install -g gh-release-download
For API:
$ npm install gh-release-download
MIT