aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/install/add-dev.md
blob: 833f8cfa2874ce4301f5dbab5b4bdb59a134e4c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
name: Add a development dependency
---

To add an npm package as a development dependency, use `bun add --development`.

```sh
$ bun add zod --development
$ bun add zod -d # shorthand
```

---

This will add the package to `devDependencies` in `package.json`.

```json-diff
{
  "devDependencies": {
+   "zod": "^3.0.0"
  }
}
```

---

See [Docs > Package manager](/docs/cli/install) for complete documentation of Bun's package manager.