From 62ca05017d758e254eda2dfaf9678d2038a9235b Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 16 Nov 2023 15:47:28 +0100 Subject: [PATCH] doc: add documentation for --build-snapshot-config PR-URL: https://github.com/nodejs/node/pull/50453 Refs: https://github.com/nodejs/node/issues/42566 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Stephen Belanger --- doc/api/cli.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index c17af97f38b3fd..1b2195934075ce 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -323,6 +323,30 @@ Currently the support for run-time snapshot is experimental in that: a report in the [Node.js issue tracker][] and link to it in the [tracking issue for user-land snapshots][]. +### `--build-snapshot-config` + + + +> Stability: 1 - Experimental + +Specifies the path to a JSON configuration file which configures snapshot +creation behavior. + +The following options are currently supported: + +* `builder` {string} Required. Provides the name to the script that is executed + before building the snapshot, as if [`--build-snapshot`][] had been passed + with `builder` as the main script name. +* `withoutCodeCache` {boolean} Optional. Including the code cache reduces the + time spent on compiling functions included in the snapshot at the expense + of a bigger snapshot size and potentially breaking portability of the + snapshot. + +When using this flag, additional script files provided on the command line will +not be executed and instead be interpreted as regular command line arguments. + ### `-c`, `--check`