Commit 0d846fbd authored by Jeongmin Byun's avatar Jeongmin Byun

write README

parent f6102ac4
# gitlab-artifact-dep
This module helps managing node.js package dependency towards Gitlab artifacts.
To use this module, include information that is required to
download and sync your Gitlab artifacts in your project's `package.json`.
Provide an object value with a key `"gitlabArtifactDep"`, which includes
base url for your Gitlab API server as `baseUrl`,
base path to save your dependencies as `basePath`,
token to access the server as `token`,
and detailed information about the artifacts as `dependencies`.
`dependencies` object should have one key for each dependent project.
For each dependent project, the object should contain
project identifier as `project`, _ref_ as `ref`,
job to take artifact from as `job`, and Boolean values `install` and `link`.
When `install` is true, this module will run `$ yarn install` in the root of
the artifact after download and/or update.
When `link` is true, this module will use `$ yarn link` command to link your
dependency to the host project.
Following example is a part of the `package.json` file for
download and updating `elice-blocks` project as a dependency.
"name": "elice-web",
"version": "",
"description": "elice-web",
"author": "elice",
"gitlabArtifactDep": {
"baseUrl": "",
"token": "-wHuihVh2HwesjQTS",
"basePath": "gitlab_artifacts",
"dependencies": {
"elice-blocks": {
"project": "elice/elice-blocks",
"ref": "v0.5.2.*",
"job": "release-job",
"install": true,
"link": false
To download and/or update your dependencies, run exported module as a function.
const gitlabArtifactDep = require('gitlab-artifact-dep');
This will return a promise instance, so you can directly return this in your
gulp task if you need to.
gulp.task('gitlab-install', ['pre-gitlab-install'], function() {
return gitlabArtifactDep();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment