Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

git-clone-repo

aichbauer66MIT1.0.0

Clone a git repository

git, clone, repo, is-git

readme

git-clone-repo

Clone a git repository

Build Status Build status Coverage Status

Installation

$ npm i git-clone-repo --save

or

$ yarn add git-clone-repo

Usage

const gitCloneRepo = require('git-clone-repo'); // import gitCloneRepo from 'git-clone-repo'

// clones the repo to your current working dir
gitCloneRepo('www.github.com/username/repo-that-exists'); // => true

// clones the repo to your current working dir
gitCloneRepo('https://www.github.com/username/repo-that-exists'); // => true

// clones the repo to your current working dir
gitCloneRepo('username/repo-that-exists', { host: 'bitbucket.com' }); // => true

// clones the repo to your current working dir + 'your/destination/path'
gitCloneRepo('username/repo-that-exists', { 
  host: 'bitbucket.com', 
  destination: 'your/destination/path' 
}); // => true

// automatically checks github if no host is provided
gitCloneRepo('username/repo-that-not-exists'); // => false

LICENSE

MIT © Lukas Aichbauer

changelog

1.0.0 - September, 18 2017

  • 1e0e18f Test: fix typos in the titles (aichbauer)
  • 05315aa Docs: add badges (aichbauer)
  • 2991b51 Initial commit (aichbauer)