@uigstudio/gitlab-env
TypeScript icon, indicating that this package has built-in type declarations

0.5.3 • Public • Published

Gitlab env

Install

npm install @uig/gitlab-env --save-dev

or

yarn add -D @uig/gitlab-env

Usage

Save gitlab Personal Access Token to ~/.glconfig to use it in all projects.

  1. Create PATH - https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
    • Needed scope: api, read_api, read_repository
  2. Save token gitlab api url in ~/.glconfig file
{
  "token" : "<TOKEN>",
  "url" : "<GITLAB_INSTANCE_URL>"
}
  1. Edit package.json > postinstall script:
{
    "scripts": {
        "postinstall": "gitlab-env -i <ID>"
    }
}
  1. Run it once
yarn postinstall

Available props

Name Type Default Description
-i, --id string or number REQUIRED Gitlab project id
-e, --env string local Enviroment
-o, --output string .env.local Outout file
-c, --glConfig string ~/.glconfig File with gitlab auth token
-t, --token string undefined Gitlab auth token
-b, --blocklist string undefined Coma separated blocked keys
-m, --mode enum(replace, append) replace Save mode
-u, --url string https://gitlab.com Gitlab instance url

Package Sidebar

Install

npm i @uigstudio/gitlab-env

Weekly Downloads

1

Version

0.5.3

License

MIT

Unpacked Size

18.6 kB

Total Files

19

Last publish

Collaborators

  • lwielgus
  • uig
  • lucas_uig