Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fc5fecda
Commit
fc5fecda
authored
Mar 01, 2020
by
Kilian Decaderincourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply suggestion to doc/ci/caching/index.md
parent
82fc55a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
doc/ci/caching/index.md
doc/ci/caching/index.md
+5
-9
No files found.
doc/ci/caching/index.md
View file @
fc5fecda
...
@@ -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
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment