Skip to content

Commit 307b3bd

Browse files
committedJan 14, 2021
fix(docs): clean up npm stop docs
Adds an example and outlines differences with `npm start` PR-URL: #2460 Credit: @wraithgar Close: #2460 Reviewed-by: @darcyclarke
1 parent 7dd0dfc commit 307b3bd

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed
 

‎docs/content/commands/npm-stop.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,31 @@ npm stop [-- <args>]
1212

1313
### Description
1414

15-
This runs a package's "stop" script, if one was provided.
15+
This runs a predefined command specified in the "stop" property of a
16+
package's "scripts" object.
17+
18+
Unlike with [npm start](/commands/npm-start), there is no default script
19+
that will run if the `"stop"` property is not defined.
20+
21+
### Example
22+
23+
```json
24+
{
25+
"scripts": {
26+
"stop": "node bar.js"
27+
}
28+
}
29+
```
30+
31+
```bash
32+
npm stop
33+
34+
> npm@x.x.x stop
35+
> node bar.js
36+
37+
(bar.js output would be here)
38+
39+
```
1640

1741
### See Also
1842

0 commit comments

Comments
 (0)
Please sign in to comment.