UNPKG

gitly

Version:

An API to download and/or extract git repositories

18 lines (17 loc) 628 B
import type GitlyOptions from '../interfaces/options'; /** * Uses local git installation to clone a repository to the destination. * @param repository The repository to clone * @param options The options to use * @returns The path to the cloned repository * @throws {GitlyCloneError} When the repository fails to clone * @note This method requires a local git installation * @note This method caches the repository by default * @example * ```js * // ... * const path = await clone('iwatakeshi/git-copy') * // ... * ``` */ export default function clone(repository: string, options?: GitlyOptions): Promise<string>;