tldr/pages/common/npx.md

25 lines
619 B
Markdown
Raw Normal View History

2018-01-06 13:19:04 +00:00
# npx
> Execute binaries from `npm` packages.
> More information: <https://github.com/npm/npx>.
2018-01-06 13:19:04 +00:00
- Execute the command from a local or remote `npm` package:
2018-01-06 13:19:04 +00:00
`npx {{command}} {{arg1 arg2 ...}}`
2018-01-06 13:19:04 +00:00
- In case multiple commands with the same name exist, it is possible to specify the package name:
2018-01-06 13:19:04 +00:00
`npx --package {{package_name}} {{command}}`
2018-01-06 13:19:04 +00:00
- Run a command if it exists in the current path or in `node_modules/.bin`:
`npx --no-install {{command}} {{command_arguments}}`
- Execute a specific command suppressing any output from `npx` itself:
`npx --quiet {{command}} {{arg1 arg2 ...}}`
- Display help:
2018-01-06 13:19:04 +00:00
`npx --help`