mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 06:43:43 +00:00
34 lines
501 B
Plaintext
34 lines
501 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# npm run
|
|
|
|
> Run a script.
|
|
> More information: <https://docs.npmjs.com/cli/commands/npm-run-script>.
|
|
|
|
- Run a script:
|
|
|
|
`npm run {{script_name}}`
|
|
|
|
- Pass arguments to a script:
|
|
|
|
`npm run {{script_name}} -- {{argument}} {{--option}}`
|
|
|
|
- Run a script named `start`:
|
|
|
|
`npm start`
|
|
|
|
- Run a script named `stop`:
|
|
|
|
`npm stop`
|
|
|
|
- Run a script named `restart`:
|
|
|
|
`npm restart`
|
|
|
|
- Run a script named `test`:
|
|
|
|
`npm test`
|