Skip to content

Commit c2d5b05

Browse files
authored
Update javascript-with-nodejs.md
1 parent 6b3b108 commit c2d5b05

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

user/languages/javascript-with-nodejs.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
title: Building a JavaScript and Node.js project
2+
title: Build a JavaScript and Node.js project
33
layout: en
44

55
---
66

7-
## What This Guide Covers
87

98
<aside markdown="block" class="ataglance">
109

@@ -32,7 +31,7 @@ This guide covers build environment and configuration topics specific to JavaScr
3231
projects. Please make sure to read our [Onboarding](/user/onboarding/)
3332
and [General Build configuration](/user/customizing-the-build/) guides first.
3433
35-
## Specifying Node.js versions
34+
## Specify Node.js versions
3635
3736
The easiest way to specify Node.js versions is to use one or more of the latest
3837
releases in your `.travis.yml`:
@@ -57,13 +56,13 @@ the Environment Reference pages:
5756
* [Trusty](/user/reference/trusty/#javascript-and-nodejs-images)
5857

5958
If you need more specific control of Node.js versions in your build, use any
60-
version installable by `nvm`. If your `.travis.yml` contains a version of
59+
version that is installable by `nvm`. If your `.travis.yml` contains a version of
6160
Node.js that `nvm` cannot install, such as `0.4`, the job errors immediately.
6261

6362
For a precise list of versions pre-installed on the VM, please consult "Build
6463
system information" in the build log.
6564

66-
## Specifying Node.js versions using .nvmrc
65+
## Specify Node.js versions using .nvmrc
6766

6867
Optionally, your repository can contain a `.nvmrc` file in the repository root
6968
to specify which *single* version of Node.js to run your tests against.
@@ -88,11 +87,11 @@ In the case where no `package.json` file is present in the root folder, the defa
8887
make test
8988
```
9089

91-
### Yarn is supported
90+
### Yarn Support
9291

9392
If `yarn.lock` exists, the default test command will be `yarn test` instead of `npm test`.
9493

95-
### Using other Test Suites
94+
### Use other Test Suites
9695

9796
You can tell npm how to run your test suite by adding a line in `package.json`.
9897
For example, to test using Vows:
@@ -103,7 +102,7 @@ For example, to test using Vows:
103102
},
104103
```
105104

106-
## Using Gulp
105+
## Use Gulp
107106

108107
If you already use Gulp to manage your tests, install it and run the default
109108
`gulpfile.js` by adding the following lines to your `.travis.yml`:
@@ -121,9 +120,9 @@ Travis CI uses [npm](https://npmjs.org/) or [yarn](https://yarnpkg.com) to insta
121120

122121
> Note that there are no npm packages installed by default in the Travis CI environment.
123122

124-
### Using `npm`
123+
### Use npm
125124

126-
#### Using a specific `npm` version
125+
#### Use a specific npm version
127126

128127
Add the following to the [`before_install` phase](/user/job-lifecycle/) of `.travis.yml`:
129128

@@ -133,15 +132,15 @@ before_install:
133132
```
134133
{: data-file=".travis.yml"}
135134

136-
### `npm ci` support
135+
### Support for npm ci
137136

138137
If `package-lock.json` or `npm-shrinkwrap.json` exists and your npm version
139138
supports it, Travis CI will use `npm ci` instead of `npm install`.
140139

141140
This command will delete your `node_modules` folder and install all dependencies
142141
as specified in your lock file.
143142

144-
#### Caching with `npm`
143+
#### Cache with npm
145144

146145
`npm` is now cached by default, in case you want to disable it, please add the following to your `.travis.yml`:
147146

@@ -166,9 +165,9 @@ any new packages added to your `package.json` file.
166165

167166
Even when `script` is overridden, this shortcut is effective.
168167

169-
### Using `yarn`
168+
### Use yarn
170169

171-
Travis CI detects use of [yarn](https://yarnpkg.com/).
170+
Travis CI detects the use of [yarn](https://yarnpkg.com/).
172171

173172
If both `package.json` and `yarn.lock` are present in the current
174173
directory, we run the following command _instead of_
@@ -185,7 +184,7 @@ If the job does not meet this requirement, `npm install` is used
185184
instead.
186185

187186

188-
#### Using a specific `yarn` version
187+
#### Use a specific yarn version
189188

190189
Add the following to the [`before_install` phase](/user/job-lifecycle/) of `.travis.yml`:
191190

@@ -196,7 +195,7 @@ before_install:
196195
```
197196
{: data-file=".travis.yml"}
198197

199-
#### Caching with `yarn`
198+
#### Cache with yarn
200199

201200
```yaml
202201
cache: yarn
@@ -216,7 +215,7 @@ cache:
216215

217216
For more information, refer to [Caching](/user/caching/) documentation.
218217

219-
### Using shrinkwrapped git dependencies
218+
### Use shrinkwrapped git dependencies
220219

221220
Note that `npm install` can fail if a shrinkwrapped git dependency pointing to a
222221
branch has its HEAD changed.

0 commit comments

Comments
 (0)