From 52d32d1758c5ebc58944a1e8d98d57e30048e527 Mon Sep 17 00:00:00 2001 From: Dr Date: Fri, 16 Oct 2020 11:08:37 +0800 Subject: [PATCH] docs: match npm-exec.md -p usage with lib/exec.js updated usage from: https://github.com/npm/cli/blob/v7.0.1/lib/exec.js#L8-L20, and removed extra `-p` occurrences to avoid confusion. Credit: @dr-js Close: #1970 Reviewed-by: @ruyadorno --- docs/content/commands/npm-exec.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/commands/npm-exec.md b/docs/content/commands/npm-exec.md index e966b0bcd18b2..38fb1bf25af4b 100644 --- a/docs/content/commands/npm-exec.md +++ b/docs/content/commands/npm-exec.md @@ -30,9 +30,9 @@ This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via `npm run`. -Whatever packages are specified by the `--package` or `-p` option will be +Whatever packages are specified by the `--package` option will be provided in the `PATH` of the executed command, along with any locally -installed package executables. The `--package` or `-p` option may be +installed package executables. The `--package` option may be specified multiple times, to execute the supplied command in an environment where all specified packages are available. @@ -48,7 +48,7 @@ only be considered a match if they have the exact same name and version as the local dependency. If no `-c` or `--call` option is provided, then the positional arguments -are used to generate the command string. If no `-p` or `--package` options +are used to generate the command string. If no `--package` options are provided, then npm will attempt to determine the executable name from the package specifier provided as the first positional argument according to the following heuristic: