Use Git to fetch all source files from any repository. :octocat:
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jose Quintana 4f7380431c
update readme
2 years ago
.gitignore init 3 years ago
.travis.yml add yarn and fix #4 2 years ago
LICENSE.md add yarn and fix #4 2 years ago
README.md update readme 2 years ago
gitd.sh add yarn and fix #4 2 years ago
index.js promises in option validations 3 years ago
package.json 1.0.2 2 years ago
test.js promises in option validations 3 years ago
yarn.lock add yarn and fix #4 2 years ago

README.md

Gitd Build Status Standard - JavaScript Style Guide Greenkeeper badge

Use Git to fetch all source files from any repository. :octocat:

Prerequisites

  • NodeJS v4.0 or greater.
  • Git.
  • Unix-like operating systems only (this package uses a shell script). :penguin:

Install

Yarn

yarn add gitd --dev

NPM

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