Commit 33b842f4 authored by Simon Legner's avatar Simon Legner

docs/ci: fix typesetting of "Node.js"

parent d53d3a72
...@@ -197,19 +197,19 @@ For more fine tuning, read also about the ...@@ -197,19 +197,19 @@ For more fine tuning, read also about the
The most common use case of cache is to preserve contents between subsequent The most common use case of cache is to preserve contents between subsequent
runs of jobs for things like dependencies and commonly used libraries runs of jobs for things like dependencies and commonly used libraries
(Nodejs packages, PHP packages, rubygems, Python libraries, etc.), (Node.js packages, PHP packages, rubygems, Python libraries, etc.),
so they don't have to be re-fetched from the public internet. so they don't have to be re-fetched from the public internet.
NOTE: **Note:** NOTE: **Note:**
For more examples, check out our [GitLab CI/CD For more examples, check out our [GitLab CI/CD
templates](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/templates). templates](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/templates).
### Caching Nodejs dependencies ### Caching Node.js dependencies
Assuming your project is using [npm](https://www.npmjs.com/) or Assuming your project is using [npm](https://www.npmjs.com/) or
[Yarn](https://classic.yarnpkg.com/en/) to install the Nodejs dependencies, the [Yarn](https://classic.yarnpkg.com/en/) to install the Node.js dependencies, the
following example defines `cache` globally so that all jobs inherit it. following example defines `cache` globally so that all jobs inherit it.
Nodejs modules are installed in `node_modules/` and are cached per-branch: Node.js modules are installed in `node_modules/` and are cached per-branch:
```yaml ```yaml
# #
......
...@@ -6,7 +6,7 @@ type: tutorial ...@@ -6,7 +6,7 @@ type: tutorial
This guide covers the building of dependencies of a PHP project while compiling assets via an NPM script using [GitLab CI/CD](../../README.md). This guide covers the building of dependencies of a PHP project while compiling assets via an NPM script using [GitLab CI/CD](../../README.md).
While it is possible to create your own image with custom PHP and Node JS versions, for brevity, we will use an existing [Docker image](https://hub.docker.com/r/tetraweb/php/) that contains both PHP and NodeJS installed. While it is possible to create your own image with custom PHP and Node.js versions, for brevity, we will use an existing [Docker image](https://hub.docker.com/r/tetraweb/php/) that contains both PHP and Node.js installed.
```yaml ```yaml
image: tetraweb/php image: tetraweb/php
...@@ -23,7 +23,7 @@ before_script: ...@@ -23,7 +23,7 @@ before_script:
- php -r "unlink('composer-setup.php');" - php -r "unlink('composer-setup.php');"
``` ```
This will make sure we have all requirements ready. Next, we want to run `composer install` to fetch all PHP dependencies and `npm install` to load node packages, then run the `npm` script. We need to append them into `before_script` section: This will make sure we have all requirements ready. Next, we want to run `composer install` to fetch all PHP dependencies and `npm install` to load Node.js packages, then run the `npm` script. We need to append them into `before_script` section:
```yaml ```yaml
before_script: before_script:
......
...@@ -1641,7 +1641,7 @@ cache: ...@@ -1641,7 +1641,7 @@ cache:
- node_modules - node_modules
``` ```
In this example we are creating a cache for Ruby and Nodejs dependencies that In this example we are creating a cache for Ruby and Node.js dependencies that
is tied to current versions of the `Gemfile.lock` and `package.json` files. Whenever one of is tied to current versions of the `Gemfile.lock` and `package.json` files. Whenever one of
these files changes, a new cache key is computed and a new cache is created. Any future these files changes, a new cache key is computed and a new cache is created. Any future
job runs using the same `Gemfile.lock` and `package.json` with `cache:key:files` will job runs using the same `Gemfile.lock` and `package.json` with `cache:key:files` will
......
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