gitd
v1.0.2
Published
Use git to fetch all directories and files from any repository.
Downloads
4
Maintainers
Readme
Gitd
Use Git to fetch all directories and files from any repository. :octocat:
Prerequisites
Install
yarn add gitd --dev
npm install gitd --save-dev
Usage
gitd
returns a Promise object. When promise is fulfilled the directory
value is passed else when it is rejected
an Error
object is passed.
const gitd = require('gitd')
gitd({
repository: 'https://github.com/joseluisq/gitd.git',
directory: '.tmp',
branch: 'master',
})
.then(dir => console.log(`Files downloaded at "${dir}"`))
.catch(err => console.error(err.message))
Options
| Name | Required | Description
| ------------- | ------------- | ------------- |
| repository | Required | Git repository URL. |
| directory | Required | Empty directory path. (Git could create the directory if not exists) |
| branch | Optional | master
by default. You can also provide a tag
name. |
License
MIT license
© 2017 José Luis Quintana