Commit fc5fecda authored by Kilian Decaderincourt's avatar Kilian Decaderincourt

Apply suggestion to doc/ci/caching/index.md

parent 82fc55a4
...@@ -206,15 +206,11 @@ templates](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/t ...@@ -206,15 +206,11 @@ templates](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/t
### Caching Node.js dependencies ### Caching Node.js dependencies
Assuming your project is using [npm](https://www.npmjs.com/) Assuming your project is using [npm](https://www.npmjs.com/) to install the Node.js
to install the Node.js dependencies. dependencies, the following example defines `cache` globally so that all jobs inherit it.
By default, npm stores cache data in the home folder `~/.npm` but since
TIP: **Tip:** [you can't cache things outside of the project directory](../yaml/README.md#cachepaths),
By default, npm stores cache data in the home folder `~/.npm` we tell npm to use `./.npm` instead, and it is cached per-branch:
but [you can't cache things outside of the project directory](../yaml/README.md#cachepaths) so we simply tell npm to use `./.npm` instead.
The following example defines `cache` globally so that all jobs inherit it.
The npm cache is defined under `.npm/` and is cached per-branch:
```yaml ```yaml
# #
......
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