download-repo

1.0.2 • Public • Published

download-repo NPM version NPM downloads Build Status

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

Readme

Keywords

none

Package Sidebar

Install

npm i download-repo

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • kchan