aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/install/add-git.md
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-07-31 12:20:23 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-31 12:20:23 -0700
commit404b90badc5856a74c06d04062c850003e28fed5 (patch)
tree7954623cf4a792db612d0bb229a227c2ff1e9fd8 /docs/guides/install/add-git.md
parent67599f97adc77141331a5f4fc39e4d058dc70b2a (diff)
downloadbun-404b90badc5856a74c06d04062c850003e28fed5.tar.gz
bun-404b90badc5856a74c06d04062c850003e28fed5.tar.zst
bun-404b90badc5856a74c06d04062c850003e28fed5.zip
Add ecosystem guides (#3847)
* Add ecosystem guides * Update titles * Rename stric * Add unlink and fetch guides * Add formdata guide * Tweak title * Moar
Diffstat (limited to 'docs/guides/install/add-git.md')
-rw-r--r--docs/guides/install/add-git.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/guides/install/add-git.md b/docs/guides/install/add-git.md
new file mode 100644
index 000000000..c98bc29a8
--- /dev/null
+++ b/docs/guides/install/add-git.md
@@ -0,0 +1,36 @@
+---
+name: Add a Git dependency
+---
+
+Bun supports directly adding GitHub repositories as dependencies of your project.
+
+```sh
+$ bun add github:lodash/lodash
+```
+
+---
+
+This will add the following line to your `package.json`:
+
+```json-diff#package.json
+{
+ "dependencies": {
++ "lodash": "github:lodash/lodash"
+ }
+}
+```
+
+---
+
+Bun supports a number of protocols for specifying Git dependencies.
+
+```sh
+$ bun add git+https://github.com/lodash/lodash.git
+$ bun add git+ssh://github.com/lodash/lodash.git#4.17.21
+$ bun add git@github.com:lodash/lodash.git
+$ bun add github:colinhacks/zod
+```
+
+---
+
+See [Docs > Package manager](/docs/cli/install) for complete documentation of Bun's package manager.