aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/install/add-dev.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/guides/install/add-dev.md')
-rw-r--r--docs/guides/install/add-dev.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/guides/install/add-dev.md b/docs/guides/install/add-dev.md
new file mode 100644
index 000000000..833f8cfa2
--- /dev/null
+++ b/docs/guides/install/add-dev.md
@@ -0,0 +1,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.