blob: f09dbbbfa50d72b4b96f0a1efe4525cfe9749d2a (
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
|
---
name: Add a tarball dependency
---
Bun's package manager can install any publicly available tarball URL as a dependency of your project.
```sh
$ bun add zod@https://registry.npmjs.org/zod/-/zod-3.21.4.tgz
```
---
Running this command will download, extract, and install the tarball to your project's `node_modules` directory. It will also add the following line to your `package.json`:
```json-diff#package.json
{
"dependencies": {
+ "zod": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz"
}
}
```
---
The package `"zod"` can now be imported as usual.
```ts
import { z } from "zod";
```
---
See [Docs > Package manager](/docs/cli/install) for complete documentation of Bun's package manager.
|