fix(docs): clean up npm stop docs · npm/cli@307b3bd (original) (raw)

Original file line number Diff line number Diff line change
@@ -12,7 +12,31 @@ npm stop [-- ]
12 12
13 13 ### Description
14 14
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 +```
16 40
17 41 ### See Also
18 42