Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-23 20:28:23 +0300
committerStan Hu <stanhu@gmail.com>2019-07-23 20:29:57 +0300
commit928b9a105516a53d956666449e8b42974ced3267 (patch)
tree08a875615e0e2a544c9f1a02466af42040a26577 /doc/development/new_fe_guide
parentb5cc47bda6cefc1aa75e9e388f656609246ca326 (diff)
Add documentation on how to add dependencies to yarn
Danger constantly warns about de-duplicating dependencies, so put these instructions in the documentation so they can be searched.
Diffstat (limited to 'doc/development/new_fe_guide')
-rw-r--r--doc/development/new_fe_guide/dependencies.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/development/new_fe_guide/dependencies.md b/doc/development/new_fe_guide/dependencies.md
index 12a4f089d41..8a6930acd37 100644
--- a/doc/development/new_fe_guide/dependencies.md
+++ b/doc/development/new_fe_guide/dependencies.md
@@ -15,6 +15,18 @@ Exceptions are made for some tools that we require in the
`gitlab:assets:compile` CI job such as `webpack-bundle-analyzer` to analyze our
production assets post-compile.
+To add or upgrade a dependency, run:
+
+```sh
+yarn add <your dependency here>
+```
+
+This may introduce duplicate dependencies. To de-duplicate `yarn.lock`, run:
+
+```sh
+node_modules/.bin/yarn-deduplicate --list --strategy fewer yarn.lock && yarn install
+```
+
---
> TODO: Add Dependencies