npm-exec: add page, npx: convert to alias (#18127)

* Update npx.md

* Create npm-exec.md
This commit is contained in:
Managor
2025-09-22 07:53:48 +03:00
committed by GitHub
parent 0ea476a359
commit 8ce7d5586b
2 changed files with 27 additions and 20 deletions
+24
View File
@@ -0,0 +1,24 @@
# npm exec
> Execute binaries from `npm` packages.
> More information: <https://docs.npmjs.com/cli/npm-exec>.
- 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`
+3 -20
View File
@@ -1,24 +1,7 @@
# npx
> Execute binaries from `npm` packages.
> More information: <https://github.com/npm/npx>.
> 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`