0.0.8 • Published 2 years ago

@any-u/git-downloader v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

git-downloader

Download a github repository from node.

Installation

npm install @any-u/git-downloader

Usage

import download from "@any-u/git-download"
import path from "path"

download({
  url: "https://github.com/vuejs/core/tree/main/packages/reactivity",
  dest: path.resolve(__dirname, "./"),
  token: "<Github-Token>",
})

// OR
download({
  url: "https://github.com/vuejs/core/blob/main/packages/reactivity/src/reactive.ts",
  token: "<Github-Token>",
})

API

download(options, processPathFn, processContentFn)

  • options Options for downloading GitHub repository.
  • processPathFn Function for processing path
  • processContentFn Function for processing file content

Returns: Promise<void>

Options

The following properties are available on the options object:

  • url
    Type: string
    A string representing the URL for downloading GitHub repository.

  • dest
    Type: string
    Default: process.cwd()
    The file path to download the repository to.

  • token
    Type: string
    A GitHub personal token, get one here: https://github.com/settings/tokens

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago