gitlab-download
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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

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 with additional events.

Example:

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

License

(WTFPL License)

Package Sidebar

Install

npm i gitlab-download

Weekly Downloads

82

Version

2.0.0

License

WTFPL

Unpacked Size

6.98 kB

Total Files

9

Last publish

Collaborators

  • eyolas