Skip to content

Commit

Permalink
fix(docs): clean up npm stop docs
Browse files Browse the repository at this point in the history
Adds an example and outlines differences with `npm start`

PR-URL: #2460
Credit: @wraithgar
Close: #2460
Reviewed-by: @darcyclarke
  • Loading branch information
wraithgar committed Jan 14, 2021
1 parent 7dd0dfc commit 307b3bd
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion docs/content/commands/npm-stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

> npm@x.x.x stop
> node bar.js

(bar.js output would be here)

```

### See Also

Expand Down

0 comments on commit 307b3bd

Please sign in to comment.