🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

gitd

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitd

Use git to fetch all directories and files from any repository.

1.0.2
latest
Source
npm
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

Gitd Build Status Standard - JavaScript Style Guide Greenkeeper badge

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

Prerequisites

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

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

NameRequiredDescription
repositoryRequiredGit repository URL.
directoryRequiredEmpty directory path. (Git could create the directory if not exists)
branchOptionalmaster by default. You can also provide a tag name.

License

MIT license

© 2017 José Luis Quintana

Keywords

git

FAQs

Package last updated on 06 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts