From 8ce7d5586b2e8a1dba7157c85fdad86683ae236c Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Mon, 22 Sep 2025 07:53:48 +0300 Subject: [PATCH] npm-exec: add page, npx: convert to alias (#18127) * Update npx.md * Create npm-exec.md --- pages/common/npm-exec.md | 24 ++++++++++++++++++++++++ pages/common/npx.md | 23 +++-------------------- 2 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 pages/common/npm-exec.md diff --git a/pages/common/npm-exec.md b/pages/common/npm-exec.md new file mode 100644 index 0000000000..c0dca77238 --- /dev/null +++ b/pages/common/npm-exec.md @@ -0,0 +1,24 @@ +# npm exec + +> Execute binaries from `npm` packages. +> More information: . + +- Execute the command from a local or remote `npm` package: + +`npm {{[x|exec]}} {{command}} {{argument1 argument2 ...}}` + +- In case multiple commands with the same name exist, it is possible to explicitly specify the package: + +`npm {{[x|exec]}} --package {{package}} {{command}}` + +- Run a command if it exists in the current path or in `node_modules/.bin`: + +`npm {{[x|exec]}} --no-install {{command}} {{argument1 argument2 ...}}` + +- Execute a specific command suppressing any output from `npm` itself: + +`npm {{[x|exec]}} --quiet {{command}} {{argument1 argument2 ...}}` + +- Display help: + +`npm {{[x|exec]}} --help` diff --git a/pages/common/npx.md b/pages/common/npx.md index 7db7365041..0b64ff440f 100644 --- a/pages/common/npx.md +++ b/pages/common/npx.md @@ -1,24 +1,7 @@ # npx -> Execute binaries from `npm` packages. -> More information: . +> This command is an alias of `npm exec`. -- Execute the command from a local or remote `npm` package: +- View documentation for the original command: -`npx {{command}} {{argument1 argument2 ...}}` - -- In case multiple commands with the same name exist, it is possible to explicitly specify the package: - -`npx --package {{package}} {{command}}` - -- Run a command if it exists in the current path or in `node_modules/.bin`: - -`npx --no-install {{command}} {{argument1 argument2 ...}}` - -- Execute a specific command suppressing any output from `npx` itself: - -`npx --quiet {{command}} {{argument1 argument2 ...}}` - -- Display help: - -`npx --help` +`tldr npm exec`