# gitlab-download

> Download and extract a Gitlab repository from node.

Latest version **2.0.0** (published 2019-12-17) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install gitlab-download
pnpm add gitlab-download
yarn add gitlab-download
bun add gitlab-download
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-12-17 |
| First published | 2015-08-21 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | David Touzet |
| Maintainers | eyolas |
| Keywords | download, gitlab, repo, repository |

## Links

- npm: https://www.npmjs.com/package/gitlab-download
- Repository: https://github.com/eyolas/gitlab-download
- Homepage: https://github.com/eyolas/gitlab-download#readme
- Issues: https://github.com/eyolas/gitlab-download/issues
- npm.io page: https://npm.io/package/gitlab-download

## Dependencies (5)

- [tslib](https://npm.io/package/tslib.md) ^1.10.0
- [download](https://npm.io/package/download.md) ^7.1.0
- [uri-template](https://npm.io/package/uri-template.md) ^1.0.0
- [normalize-url](https://npm.io/package/normalize-url.md) ^4.5.0
- [underscore.string](https://npm.io/package/underscore.string.md) ^3.1.1

## Recent versions

- 2.0.0 (latest) — 2019-12-17
- 1.0.2 — 2015-08-21
- 1.0.0 — 2015-08-21

## README

Node.js - gitlab-download
================


Easily download Gitlab repos without any external dependencies such as Git, Tar, Unzip, etc.



Installation
------------

    npm install gitlab-download



Usage
-----

### instanciate new GitlabDownload(gitlabUrl, token)
Instanciate gitlab-download
```js
var GitlabDownload = require('gitlab-download').default;
var gitlab = new GitlabDownload('https://mysgitlab.com', 'aze12233zae');
```

- **gitlabUrl**: 
    - a Github URL string such as `https://mysgitlab.com`
- **token**: You private token.

### download(params)

Downloads the latest copy of some Gitlab reference (branch, tag, or commit), or the `master` branch by default.

- **params**: Object of param:
     - **remote**: path of project (sample:`eyolas/gitlab-download`) (required)
     - **dest**: The output directory.
     - **ref**: Gitlab reference (branch, tag, or commit). Default : `master`
     - **downloadOptions**: Options for [download api]()

Returns both a `Promise<Buffer>` and a [Duplex stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex) with [additional events](https://github.com/sindresorhus/got#streams-1).

Example:

```javascript
var GitlabDownload = require('gitlab-download');
var gitlab = new GitlabDownload('https://mysgitlab.com', 'aze12233zae');
gitlab.download({remote: 'eyolas/gitlab-download'});
```


License
-------

(WTFPL License)

---
_Source: https://npm.io/package/gitlab-download · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
