Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

gatsby-plugin-git-clone

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-git-clone

A plugin for Gatsby that clones a remote Git repository before building

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-plugin-git-clone

Version License Travis CI

A simple plugin for Gatsby that clones a remote Git repository before building. This will run git clone when you start Gatsby, with develop or build. If the repository already exists locally, it will update the repository to the latest commit.

This plugin can be used in combination with gatsby-source-filesystem to fetch content from a different repository, for example.

Requirements

  • Node.js v10 or newer.
  • Git.

Installation

First, install the package using npm or yarn.

yarn add -D gatsby-plugin-git-clone

or

npm install --save-dev gatsby-plugin-git-clone

Getting started

To use the plugin, add it to your gatsby-config.js:

import { resolve } from 'path';

export default {
  // ...
  plugins: [
    {
      resolve: 'gatsby-plugin-git-clone',
      options: {
        repository: 'https://github.com/foo/bar.git',
        path: resolve(__dirname, './foo')
      }
    }
  ]
}

Options

gatsby-plugin-git-clone has a few options:

  • repository (required) - The remote repository to clone.
  • path (required) - The local path to clone the repository to.
  • branch (optional) - The branch to clone.
  • gitOptions (optional) - The options to pass to simple-git. See the simple-git documentation.

Keywords

gatsby

FAQs

Package last updated on 01 Jul 2020

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