download-repo
Download github repo with ease.
Last updated 5 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install download-repo 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

3 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 4
This Month 29
Last Day 0
Last Week 5
Last Month 47
Dependencies (7)
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |