Skip to content

Commit 62ca050

Browse files
addaleaxjoyeecheung
authored andcommitted
doc: add documentation for --build-snapshot-config
PR-URL: #50453 Refs: #42566 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
1 parent fea74b0 commit 62ca050

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

doc/api/cli.md

+25
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,30 @@ Currently the support for run-time snapshot is experimental in that:
323323
a report in the [Node.js issue tracker][] and link to it in the
324324
[tracking issue for user-land snapshots][].
325325

326+
### `--build-snapshot-config`
327+
328+
<!-- YAML
329+
added: REPLACEME
330+
-->
331+
332+
> Stability: 1 - Experimental
333+
334+
Specifies the path to a JSON configuration file which configures snapshot
335+
creation behavior.
336+
337+
The following options are currently supported:
338+
339+
* `builder` {string} Required. Provides the name to the script that is executed
340+
before building the snapshot, as if [`--build-snapshot`][] had been passed
341+
with `builder` as the main script name.
342+
* `withoutCodeCache` {boolean} Optional. Including the code cache reduces the
343+
time spent on compiling functions included in the snapshot at the expense
344+
of a bigger snapshot size and potentially breaking portability of the
345+
snapshot.
346+
347+
When using this flag, additional script files provided on the command line will
348+
not be executed and instead be interpreted as regular command line arguments.
349+
326350
### `-c`, `--check`
327351

328352
<!-- YAML
@@ -2868,6 +2892,7 @@ done
28682892
[`--allow-fs-read`]: #--allow-fs-read
28692893
[`--allow-fs-write`]: #--allow-fs-write
28702894
[`--allow-worker`]: #--allow-worker
2895+
[`--build-snapshot`]: #--build-snapshot
28712896
[`--cpu-prof-dir`]: #--cpu-prof-dir
28722897
[`--diagnostic-dir`]: #--diagnostic-dirdirectory
28732898
[`--experimental-default-type=module`]: #--experimental-default-typetype

0 commit comments

Comments
 (0)