git-clone-promise
v1.0.0
Published
git clone promise
Downloads
37
Readme
git-clone-promise
clone a git repository via shell command , promise
Installation
$ npm install git-clone-promise
or:
$ yarn add git-clone-promise
Usage
const clone = require('git-clone-promise')
// const repo = 'https://github.com/huoqishi/x-html.git'
// or:
const repo = '[email protected]:huoqishi/x-html.git'
gitClone(repo, './test').then(() => {
console.log('ok')
})
API
clone
clone(repo, savePath, [options])
clone repo
to savePath
, return promise
on completion.
options
git
: path togit
binary; default:git
(optional).shallow
: whentrue
, clone with depth 1 (optional).checkout
: revision/branch/tag to check out (optional).
Copyright & License
© huoqishi & 火骑士空空
Released under the MIT.