Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ae85228

Browse filesBrowse files
Trottruyadorno
authored andcommitted
doc: perform minor cleanup on cli.md
* sort references in ASCII order * merge logically-connected single-sentence paragraphs * remove _please_ from referrals to other docs * remove unnecessary italics * make some text more concise * change some instances of future tense to present tense PR-URL: #35152 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
1 parent e410514 commit ae85228
Copy full SHA for ae85228

File tree

Expand file treeCollapse file tree

1 file changed

+28
-30
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+28
-30
lines changed
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
+28-30Lines changed: 28 additions & 30 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To view this documentation as a manual page in a terminal, run `man node`.
1818

1919
Execute without arguments to start the [REPL][].
2020

21-
_For more info about `node inspect`, please see the [debugger][] documentation._
21+
For more info about `node inspect`, see the [debugger][] documentation.
2222

2323
## Options
2424
<!-- YAML
@@ -30,22 +30,21 @@ changes:
3030
-->
3131

3232
All options, including V8 options, allow words to be separated by both
33-
dashes (`-`) or underscores (`_`).
33+
dashes (`-`) or underscores (`_`). For example, `--pending-deprecation` is
34+
equivalent to `--pending_deprecation`.
3435

35-
For example, `--pending-deprecation` is equivalent to `--pending_deprecation`.
36-
37-
If an option that takes a single value, for example `--max-http-header-size`,
38-
is passed more than once, then the last passed value will be used. Options
39-
from the command line take precedence over options passed through the
40-
[`NODE_OPTIONS`][] environment variable.
36+
If an option that takes a single value (such as `--max-http-header-size`) is
37+
passed more than once, then the last passed value is used. Options from the
38+
command line take precedence over options passed through the [`NODE_OPTIONS`][]
39+
environment variable.
4140

4241
### `-`
4342
<!-- YAML
4443
added: v8.0.0
4544
-->
4645

4746
Alias for stdin. Analogous to the use of `-` in other command line utilities,
48-
meaning that the script will be read from stdin, and the rest of the options
47+
meaning that the script is read from stdin, and the rest of the options
4948
are passed to that script.
5049

5150
### `--`
@@ -55,7 +54,7 @@ added: v6.11.0
5554

5655
Indicate the end of node options. Pass the rest of the arguments to the script.
5756
If no script filename or eval/print script is supplied prior to this, then
58-
the next argument will be used as a script filename.
57+
the next argument is used as a script filename.
5958

6059
### `--abort-on-uncaught-exception`
6160
<!-- YAML
@@ -106,10 +105,10 @@ added: v12.0.0
106105
Starts the V8 CPU profiler on start up, and writes the CPU profile to disk
107106
before exit.
108107

109-
If `--cpu-prof-dir` is not specified, the generated profile will be placed
108+
If `--cpu-prof-dir` is not specified, the generated profile is placed
110109
in the current working directory.
111110

112-
If `--cpu-prof-name` is not specified, the generated profile will be
111+
If `--cpu-prof-name` is not specified, the generated profile is
113112
named `CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile`.
114113

115114
```console
@@ -152,7 +151,7 @@ Specify the file name of the CPU profile generated by `--cpu-prof`.
152151

153152
### `--diagnostic-dir=directory`
154153

155-
Set the directory to which all diagnostic output files will be written to.
154+
Set the directory to which all diagnostic output files are written.
156155
Defaults to current working directory.
157156

158157
Affects the default output directory of:
@@ -166,8 +165,8 @@ added: v13.12.0
166165
-->
167166

168167
Disable the `Object.prototype.__proto__` property. If `mode` is `delete`, the
169-
property will be removed entirely. If `mode` is `throw`, accesses to the
170-
property will throw an exception with the code `ERR_PROTO_ACCESS`.
168+
property is removed entirely. If `mode` is `throw`, accesses to the
169+
property throw an exception with the code `ERR_PROTO_ACCESS`.
171170

172171
### `--disallow-code-generation-from-strings`
173172
<!-- YAML
@@ -254,10 +253,10 @@ Sets the resolution algorithm for resolving ES module specifiers. Valid options
254253
are `explicit` and `node`.
255254

256255
The default is `explicit`, which requires providing the full path to a
257-
module. The `node` mode will enable support for optional file extensions and
256+
module. The `node` mode enables support for optional file extensions and
258257
the ability to import a directory that has an index file.
259258

260-
Please see [customizing ESM specifier resolution][] for example usage.
259+
See [customizing ESM specifier resolution][] for example usage.
261260

262261
### `--experimental-vm-modules`
263262
<!-- YAML
@@ -347,10 +346,10 @@ added: v12.4.0
347346
Starts the V8 heap profiler on start up, and writes the heap profile to disk
348347
before exit.
349348

350-
If `--heap-prof-dir` is not specified, the generated profile will be placed
349+
If `--heap-prof-dir` is not specified, the generated profile is placed
351350
in the current working directory.
352351

353-
If `--heap-prof-name` is not specified, the generated profile will be
352+
If `--heap-prof-name` is not specified, the generated profile is
354353
named `Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile`.
355354

356355
```console
@@ -621,8 +620,8 @@ This flag exists so that the main module can be opted-in to the same behavior
621620
that `--preserve-symlinks` gives to all other imports; they are separate flags,
622621
however, for backward compatibility with older Node.js versions.
623622

624-
`--preserve-symlinks-main` does not imply `--preserve-symlinks`; it
625-
is expected that `--preserve-symlinks-main` will be used in addition to
623+
`--preserve-symlinks-main` does not imply `--preserve-symlinks`; use
624+
`--preserve-symlinks-main` in addition to
626625
`--preserve-symlinks` when it is not desirable to follow symlinks before
627626
resolving relative paths.
628627

@@ -1192,8 +1191,7 @@ compound after anything in `options...`. Node.js will exit with an error if
11921191
an option that is not allowed in the environment is used, such as `-p` or a
11931192
script file.
11941193

1195-
In case an option value happens to contain a space (for example a path listed
1196-
in `--require`), it must be escaped using double quotes. For example:
1194+
If an option value contains a space, it can be escaped using double quotes:
11971195

11981196
```bash
11991197
NODE_OPTIONS='--require "./my path/file.js"'
@@ -1555,22 +1553,22 @@ On a machine with 2GB of memory, consider setting this to
15551553
$ node --max-old-space-size=1536 index.js
15561554
```
15571555

1556+
[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
1557+
[REPL]: repl.html
1558+
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
1559+
[Source Map]: https://sourcemaps.info/spec.html
1560+
[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
1561+
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
15581562
[`--openssl-config`]: #cli_openssl_config_file
15591563
[`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait
15601564
[`Buffer`]: buffer.html#buffer_class_buffer
1561-
[`SlowBuffer`]: buffer.html#buffer_class_slowbuffer
15621565
[`NODE_OPTIONS`]: #cli_node_options_options
1566+
[`SlowBuffer`]: buffer.html#buffer_class_slowbuffer
15631567
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn
15641568
[`tls.DEFAULT_MAX_VERSION`]: tls.html#tls_tls_default_max_version
15651569
[`tls.DEFAULT_MIN_VERSION`]: tls.html#tls_tls_default_min_version
15661570
[`unhandledRejection`]: process.html#process_event_unhandledrejection
15671571
[`worker_threads.threadId`]: worker_threads.html#worker_threads_worker_threadid
1568-
[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
1569-
[REPL]: repl.html
1570-
[ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
1571-
[Source Map]: https://sourcemaps.info/spec.html
1572-
[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
1573-
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
15741572
[context-aware]: addons.html#addons_context_aware_addons
15751573
[customizing ESM specifier resolution]: esm.html#esm_customizing_esm_specifier_resolution_algorithm
15761574
[debugger]: debugger.html

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.