Socket
Socket
Sign inDemoInstall

gitd

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitd

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


Version published
Maintainers
1
Install size
12.2 kB
Created

Readme

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

FAQs

Last updated on 06 Apr 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc