blob: c98bc29a854ce8c1dd568531976e12b30c43fb74 (
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
27
28
29
30
31
32
33
34
35
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.
|