Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

absolunet/node-git-archive

Repository files navigation

@absolunet/git-archive

npm npm dependencies npms Travis CI Code style

git archive --remote wrapper

Install

$ npm install @absolunet/git-archive

Usage

const gitArchive = require('@absolunet/git-archive');

gitArchive.download('git@github.com:absolunet/node-git-archive.git').then((dir) => {
	console.log(dir);
});

API

download(url [, options])

Returns a Promise with the path of the downloaded archive

url

Required
Type: String
Repo url as specified by git-archive#remote

options.treeish

Type: String
Default: master
The tree or commit to produce an archive for as specified by git-archive#tree-ish

options.format

Type: String
Default: zip
Format of the resulting archive as specified by git-archive#format

options.extract

Type: Boolean
Default: true
Extract the archive

options.path

Type: String
Default: tmp
Path and name of the archive file or path of the extracted archive. If not specified will be put in a temporary path.



License

MIT © Absolunet

About

git archive --remote wrapper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published