@absolunet/git-archive

git archive --remote wrapper

Usage no npm install needed!

<script type="module">
  import absolunetGitArchive from 'https://cdn.skypack.dev/@absolunet/git-archive';
</script>

README

@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