download-repo
v1.0.2
Published
Download github repo with ease.
Downloads
7
Readme
download-repo
Download github repo with ease.
Install
$ npm install --save download-repo
Usage
const downloadRepo = require('download-repo')
// download egoist/tooling's master branch archive
downloadRepo('egoist/tooling', {target: 'tooling'})
.then(() => {
console.log('done, `cd tooling` to check out more!')
})
// download reactjs/redux by tag v4.0.0
downloadRepo('reactjs/redux', {target: 'redux', tag: 'v4.0.0'})
.then(() => {
console.log('done, `cd redux` to check out more!')
})
API
downloadRepo(repo, [options])
repo
Type: string
User's repo, format like owner/repo
options
target
Type: string
Default: the original filename, format like reponame-[branch|tag]
The target name.
dir
Type: string
Default: process.cwd()
The directory to move the target to.
branch
Type: string
Default: master
The branch to download.
tag
Type: string
The tag to download, will override branch
if set.
quiet
Type: boolean
Default: false
Omit the progress bar when downloading.
License
MIT © EGOIST