-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds an example and outlines differences with `npm start` PR-URL: #2460 Credit: @wraithgar Close: #2460 Reviewed-by: @darcyclarke
- Loading branch information
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,31 @@ npm stop [-- <args>] | |
|
||
### Description | ||
|
||
This runs a package's "stop" script, if one was provided. | ||
This runs a predefined command specified in the "stop" property of a | ||
package's "scripts" object. | ||
|
||
Unlike with [npm start](/commands/npm-start), there is no default script | ||
that will run if the `"stop"` property is not defined. | ||
|
||
### Example | ||
|
||
```json | ||
{ | ||
"scripts": { | ||
"stop": "node bar.js" | ||
} | ||
} | ||
``` | ||
|
||
```bash | ||
npm stop | ||
|
||
> [email protected] stop | ||
> node bar.js | ||
|
||
(bar.js output would be here) | ||
|
||
``` | ||
|
||
### See Also | ||
|
||
|