Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/content/commands/npm-run-script.md15
-rw-r--r--lib/commands/run-script.js1
-rw-r--r--tap-snapshots/test/lib/load-all-commands.js.test.cjs2
-rw-r--r--tap-snapshots/test/lib/npm.js.test.cjs2
4 files changed, 18 insertions, 2 deletions
diff --git a/docs/content/commands/npm-run-script.md b/docs/content/commands/npm-run-script.md
index d94040f1a..f606ec6bf 100644
--- a/docs/content/commands/npm-run-script.md
+++ b/docs/content/commands/npm-run-script.md
@@ -240,6 +240,21 @@ will *not* run any pre- or post-scripts.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
+#### `foreground-scripts`
+
+* Default: false
+* Type: Boolean
+
+Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)
+scripts for installed packages in the foreground process, sharing standard
+input, output, and error with the main npm process.
+
+Note that this will generally make installs run slower, and be much noisier,
+but can be useful for debugging.
+
+<!-- automatically generated, do not edit manually -->
+<!-- see lib/utils/config/definitions.js -->
+
#### `script-shell`
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
diff --git a/lib/commands/run-script.js b/lib/commands/run-script.js
index a1591c790..8507dbe79 100644
--- a/lib/commands/run-script.js
+++ b/lib/commands/run-script.js
@@ -35,6 +35,7 @@ class RunScript extends BaseCommand {
'include-workspace-root',
'if-present',
'ignore-scripts',
+ 'foreground-scripts',
'script-shell',
]
diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
index 13a3b06fe..57dd61266 100644
--- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs
+++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
@@ -746,7 +746,7 @@ npm run-script <command> [-- <args>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
-[--script-shell <script-shell>]
+[--foreground-scripts] [--script-shell <script-shell>]
aliases: run, rum, urn
diff --git a/tap-snapshots/test/lib/npm.js.test.cjs b/tap-snapshots/test/lib/npm.js.test.cjs
index 2cf4f53ec..b287e73f7 100644
--- a/tap-snapshots/test/lib/npm.js.test.cjs
+++ b/tap-snapshots/test/lib/npm.js.test.cjs
@@ -790,7 +790,7 @@ All commands:
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
- [--script-shell <script-shell>]
+ [--foreground-scripts] [--script-shell <script-shell>]
aliases: run, rum, urn