Skip to content

Commit 5be7d6e

Browse files
authored
docs: add foreground-scripts to run-script page (#5087)
1 parent 0ce09f1 commit 5be7d6e

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

docs/content/commands/npm-run-script.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,21 @@ will *not* run any pre- or post-scripts.
240240
<!-- automatically generated, do not edit manually -->
241241
<!-- see lib/utils/config/definitions.js -->
242242

243+
#### `foreground-scripts`
244+
245+
* Default: false
246+
* Type: Boolean
247+
248+
Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)
249+
scripts for installed packages in the foreground process, sharing standard
250+
input, output, and error with the main npm process.
251+
252+
Note that this will generally make installs run slower, and be much noisier,
253+
but can be useful for debugging.
254+
255+
<!-- automatically generated, do not edit manually -->
256+
<!-- see lib/utils/config/definitions.js -->
257+
243258
#### `script-shell`
244259

245260
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows

lib/commands/run-script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class RunScript extends BaseCommand {
3535
'include-workspace-root',
3636
'if-present',
3737
'ignore-scripts',
38+
'foreground-scripts',
3839
'script-shell',
3940
]
4041

tap-snapshots/test/lib/load-all-commands.js.test.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ npm run-script <command> [-- <args>]
746746
Options:
747747
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
748748
[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
749-
[--script-shell <script-shell>]
749+
[--foreground-scripts] [--script-shell <script-shell>]
750750
751751
aliases: run, rum, urn
752752

tap-snapshots/test/lib/npm.js.test.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ All commands:
790790
Options:
791791
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
792792
[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
793-
[--script-shell <script-shell>]
793+
[--foreground-scripts] [--script-shell <script-shell>]
794794
795795
aliases: run, rum, urn
796796

0 commit comments

Comments
 (0)