mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: add instructions for bun package manager (#12182)
This commit is contained in:
parent
bd9bce8070
commit
feba5e742f
@ -53,7 +53,7 @@ npm i vant
|
|||||||
npm i vant@latest-v2
|
npm i vant@latest-v2
|
||||||
```
|
```
|
||||||
|
|
||||||
Using `yarn` or `pnpm`:
|
Using `yarn`, `pnpm`, or `bun`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# with yarn
|
# with yarn
|
||||||
@ -61,6 +61,9 @@ yarn add vant
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add vant
|
pnpm add vant
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add vant
|
||||||
```
|
```
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
@ -57,7 +57,7 @@ npm i vant
|
|||||||
npm i vant@latest-v2
|
npm i vant@latest-v2
|
||||||
```
|
```
|
||||||
|
|
||||||
当然,你也可以通过 `yarn` 或 `pnpm` 进行安装:
|
当然,你也可以通过 `yarn` 或 `pnpm` 或 `bun` 进行安装:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 通过 yarn 安装
|
# 通过 yarn 安装
|
||||||
@ -65,6 +65,9 @@ yarn add vant
|
|||||||
|
|
||||||
# 通过 pnpm 安装
|
# 通过 pnpm 安装
|
||||||
pnpm add vant
|
pnpm add vant
|
||||||
|
|
||||||
|
# 通过 bun 安装
|
||||||
|
bun add vant
|
||||||
```
|
```
|
||||||
|
|
||||||
## 快速上手
|
## 快速上手
|
||||||
|
@ -11,4 +11,7 @@ yarn add <%= name %>
|
|||||||
|
|
||||||
# 通过 pnpm
|
# 通过 pnpm
|
||||||
pnpm add <%= name %>
|
pnpm add <%= name %>
|
||||||
|
|
||||||
|
# 通过 bun
|
||||||
|
bun add <%= name %>
|
||||||
```
|
```
|
||||||
|
@ -11,4 +11,7 @@ yarn add <%= name %>
|
|||||||
|
|
||||||
# 通过 pnpm
|
# 通过 pnpm
|
||||||
pnpm add <%= name %>
|
pnpm add <%= name %>
|
||||||
|
|
||||||
|
# 通过 bun
|
||||||
|
bun add <%= name %>
|
||||||
```
|
```
|
||||||
|
@ -13,6 +13,9 @@ yarn add @vant/area-data
|
|||||||
|
|
||||||
# 通过 pnpm
|
# 通过 pnpm
|
||||||
pnpm add @vant/area-data
|
pnpm add @vant/area-data
|
||||||
|
|
||||||
|
# 通过 Bun
|
||||||
|
bun add @vant/area-data
|
||||||
```
|
```
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
@ -32,6 +32,9 @@ yarn add @vant/cli -D
|
|||||||
|
|
||||||
# via pnpm
|
# via pnpm
|
||||||
pnpm add @vant/cli -D
|
pnpm add @vant/cli -D
|
||||||
|
|
||||||
|
# via Bun
|
||||||
|
bun add @vant/cli -D
|
||||||
```
|
```
|
||||||
|
|
||||||
Please add the followed config to `package.json` file.
|
Please add the followed config to `package.json` file.
|
||||||
|
@ -29,6 +29,9 @@ yarn add @vant/cli -D
|
|||||||
|
|
||||||
# 通过 pnpm
|
# 通过 pnpm
|
||||||
pnpm add @vant/cli -D
|
pnpm add @vant/cli -D
|
||||||
|
|
||||||
|
# 通过 Bun
|
||||||
|
bun add @vant/cli -D
|
||||||
```
|
```
|
||||||
|
|
||||||
安装完成后,请将以下配置添加到 package.json 文件中
|
安装完成后,请将以下配置添加到 package.json 文件中
|
||||||
|
@ -218,7 +218,7 @@ If you need to configure some vite plugins, please create a `vite.config.ts` fil
|
|||||||
|
|
||||||
### build.packageManager
|
### build.packageManager
|
||||||
|
|
||||||
- Type: `'npm' | 'yarn' | 'pnpm'`
|
- Type: `'npm' | 'yarn' | 'pnpm' | 'bun'`
|
||||||
- Default: `yarn`
|
- Default: `yarn`
|
||||||
|
|
||||||
`npm` package manager.
|
`npm` package manager.
|
||||||
|
@ -220,7 +220,7 @@ module.exports = {
|
|||||||
|
|
||||||
### build.packageManager
|
### build.packageManager
|
||||||
|
|
||||||
- Type: `'npm' | 'yarn' | 'pnpm'`
|
- Type: `'npm' | 'yarn' | 'pnpm' | 'bun'`
|
||||||
- Default: `yarn`
|
- Default: `yarn`
|
||||||
|
|
||||||
指定使用的包管理器。
|
指定使用的包管理器。
|
||||||
|
@ -13,6 +13,9 @@ yarn add @vant/compat
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/compat
|
pnpm add @vant/compat
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/compat
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -11,6 +11,9 @@ yarn add @vant/eslint-config -D
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/eslint-config -D
|
pnpm add @vant/eslint-config -D
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/eslint-config -D
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -11,6 +11,9 @@ yarn add @vant/icons
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/icons
|
pnpm add @vant/icons
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/icons
|
||||||
```
|
```
|
||||||
|
|
||||||
## Document
|
## Document
|
||||||
|
@ -13,6 +13,9 @@ yarn add @vant/popperjs
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/popperjs
|
pnpm add @vant/popperjs
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/popperjs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -13,6 +13,9 @@ yarn add @vant/touch-emulator
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/touch-emulator
|
pnpm add @vant/touch-emulator
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/touch-emulator
|
||||||
```
|
```
|
||||||
|
|
||||||
## 使用指南
|
## 使用指南
|
||||||
|
@ -13,4 +13,7 @@ yarn add @vant/use
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/use
|
pnpm add @vant/use
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/use
|
||||||
```
|
```
|
||||||
|
@ -19,6 +19,9 @@ yarn add vant@^4 @vant/compat@^1
|
|||||||
|
|
||||||
# Install via pnpm
|
# Install via pnpm
|
||||||
pnpm add vant@^4 @vant/compat@^1
|
pnpm add vant@^4 @vant/compat@^1
|
||||||
|
|
||||||
|
# Install via Bun
|
||||||
|
bun add vant@^4 @vant/compat@^1
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also change the version directly in the `dependencies` field of `package.json`, and you will need to reinstall the dependencies after the change.
|
You can also change the version directly in the `dependencies` field of `package.json`, and you will need to reinstall the dependencies after the change.
|
||||||
|
@ -19,6 +19,9 @@ yarn add vant@^4 @vant/compat@^1
|
|||||||
|
|
||||||
# 通过 pnpm 安装
|
# 通过 pnpm 安装
|
||||||
pnpm add vant@^4 @vant/compat@^1
|
pnpm add vant@^4 @vant/compat@^1
|
||||||
|
|
||||||
|
# 通过 Bun 安装
|
||||||
|
bun add vant@^4 @vant/compat@^1
|
||||||
```
|
```
|
||||||
|
|
||||||
你也可以直接修改 `package.json` 的 `dependencies` 字段中的版本号,修改完成后需要重新安装依赖。
|
你也可以直接修改 `package.json` 的 `dependencies` 字段中的版本号,修改完成后需要重新安装依赖。
|
||||||
|
@ -14,7 +14,7 @@ npm i vant
|
|||||||
npm i vant@latest-v2
|
npm i vant@latest-v2
|
||||||
```
|
```
|
||||||
|
|
||||||
Using `yarn` or `pnpm`:
|
Using `yarn`, `pnpm`, or `bun`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# with yarn
|
# with yarn
|
||||||
@ -22,6 +22,9 @@ yarn add vant
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add vant
|
pnpm add vant
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add vant
|
||||||
```
|
```
|
||||||
|
|
||||||
### CDN
|
### CDN
|
||||||
@ -126,6 +129,9 @@ yarn add unplugin-vue-components -D
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add unplugin-vue-components -D
|
pnpm add unplugin-vue-components -D
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add unplugin-vue-components -D
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. Configure Plugin
|
#### 2. Configure Plugin
|
||||||
@ -235,6 +241,9 @@ yarn add @vant/nuxt -D
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/nuxt -D
|
pnpm add @vant/nuxt -D
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/nuxt -D
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. Add Module
|
#### 2. Add Module
|
||||||
|
@ -26,6 +26,9 @@ yarn add vant
|
|||||||
|
|
||||||
# 通过 pnpm 安装
|
# 通过 pnpm 安装
|
||||||
pnpm add vant
|
pnpm add vant
|
||||||
|
|
||||||
|
# 通过 Bun 安装
|
||||||
|
bun add vant
|
||||||
```
|
```
|
||||||
|
|
||||||
### 通过 CDN 安装
|
### 通过 CDN 安装
|
||||||
@ -130,6 +133,9 @@ yarn add unplugin-vue-components -D
|
|||||||
|
|
||||||
# 通过 pnpm 安装
|
# 通过 pnpm 安装
|
||||||
pnpm add unplugin-vue-components -D
|
pnpm add unplugin-vue-components -D
|
||||||
|
|
||||||
|
# 通过 bun 安装
|
||||||
|
bun add unplugin-vue-components -D
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. 配置插件
|
#### 2. 配置插件
|
||||||
@ -239,6 +245,9 @@ yarn add @vant/nuxt -D
|
|||||||
|
|
||||||
# 通过 pnpm 安装
|
# 通过 pnpm 安装
|
||||||
pnpm add @vant/nuxt -D
|
pnpm add @vant/nuxt -D
|
||||||
|
|
||||||
|
# 通过 Bun 安装
|
||||||
|
bun add @vant/nuxt -D
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2. 增加模块
|
#### 2. 增加模块
|
||||||
|
@ -17,6 +17,9 @@ yarn add @vant/use
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/use
|
pnpm add @vant/use
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/use
|
||||||
```
|
```
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
|
@ -17,6 +17,9 @@ yarn add @vant/use
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/use
|
pnpm add @vant/use
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/use
|
||||||
```
|
```
|
||||||
|
|
||||||
### 示例
|
### 示例
|
||||||
|
@ -63,6 +63,9 @@ yarn add @vant/area-data
|
|||||||
|
|
||||||
# with pnpm
|
# with pnpm
|
||||||
pnpm add @vant/area-data
|
pnpm add @vant/area-data
|
||||||
|
|
||||||
|
# with Bun
|
||||||
|
bun add @vant/area-data
|
||||||
```
|
```
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
@ -65,6 +65,9 @@ yarn add @vant/area-data
|
|||||||
|
|
||||||
# 通过 pnpm
|
# 通过 pnpm
|
||||||
pnpm add @vant/area-data
|
pnpm add @vant/area-data
|
||||||
|
|
||||||
|
# 通过 Bun
|
||||||
|
bun add @vant/area-data
|
||||||
```
|
```
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
@ -93,6 +93,9 @@ yarn add @vant/area-data
|
|||||||
|
|
||||||
# 通过 pnpm
|
# 通过 pnpm
|
||||||
pnpm add @vant/area-data
|
pnpm add @vant/area-data
|
||||||
|
|
||||||
|
# 通过 Bun
|
||||||
|
bun add @vant/area-data
|
||||||
```
|
```
|
||||||
|
|
||||||
```html
|
```html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user