git-clone-repo

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i git-clone-repo

Weekly Downloads

9

Version

1.0.0

License

MIT

Last publish

Collaborators

  • aichbauer