docs: add instructions for bun package manager (#12182)

This commit is contained in:
Colin McDonnell
2023-08-14 13:18:25 +08:00
committed by GitHub
parent bd9bce8070
commit feba5e742f
24 changed files with 83 additions and 5 deletions
@@ -11,4 +11,7 @@ yarn add <%= name %>
# 通过 pnpm
pnpm add <%= name %>
# 通过 bun
bun add <%= name %>
```
@@ -11,4 +11,7 @@ yarn add <%= name %>
# 通过 pnpm
pnpm add <%= name %>
# 通过 bun
bun add <%= name %>
```
+3
View File
@@ -13,6 +13,9 @@ yarn add @vant/area-data
# 通过 pnpm
pnpm add @vant/area-data
# 通过 Bun
bun add @vant/area-data
```
## 使用
+3
View File
@@ -32,6 +32,9 @@ yarn add @vant/cli -D
# via pnpm
pnpm add @vant/cli -D
# via Bun
bun add @vant/cli -D
```
Please add the followed config to `package.json` file.
+3
View File
@@ -29,6 +29,9 @@ yarn add @vant/cli -D
# 通过 pnpm
pnpm add @vant/cli -D
# 通过 Bun
bun add @vant/cli -D
```
安装完成后,请将以下配置添加到 package.json 文件中
+1 -1
View File
@@ -218,7 +218,7 @@ If you need to configure some vite plugins, please create a `vite.config.ts` fil
### build.packageManager
- Type: `'npm' | 'yarn' | 'pnpm'`
- Type: `'npm' | 'yarn' | 'pnpm' | 'bun'`
- Default: `yarn`
`npm` package manager.
+1 -1
View File
@@ -220,7 +220,7 @@ module.exports = {
### build.packageManager
- Type: `'npm' | 'yarn' | 'pnpm'`
- Type: `'npm' | 'yarn' | 'pnpm' | 'bun'`
- Default: `yarn`
指定使用的包管理器。
+3
View File
@@ -13,6 +13,9 @@ yarn add @vant/compat
# with pnpm
pnpm add @vant/compat
# with Bun
bun add @vant/compat
```
## Usage
+3
View File
@@ -11,6 +11,9 @@ yarn add @vant/eslint-config -D
# with pnpm
pnpm add @vant/eslint-config -D
# with Bun
bun add @vant/eslint-config -D
```
## Usage
+3
View File
@@ -11,6 +11,9 @@ yarn add @vant/icons
# with pnpm
pnpm add @vant/icons
# with Bun
bun add @vant/icons
```
## Document
+3
View File
@@ -13,6 +13,9 @@ yarn add @vant/popperjs
# with pnpm
pnpm add @vant/popperjs
# with Bun
bun add @vant/popperjs
```
## Usage
+3
View File
@@ -13,6 +13,9 @@ yarn add @vant/touch-emulator
# with pnpm
pnpm add @vant/touch-emulator
# with Bun
bun add @vant/touch-emulator
```
## 使用指南
+3
View File
@@ -13,4 +13,7 @@ yarn add @vant/use
# with pnpm
pnpm add @vant/use
# with Bun
bun add @vant/use
```
@@ -19,6 +19,9 @@ yarn add vant@^4 @vant/compat@^1
# Install via pnpm
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.
@@ -19,6 +19,9 @@ yarn add vant@^4 @vant/compat@^1
# 通过 pnpm 安装
pnpm add vant@^4 @vant/compat@^1
# 通过 Bun 安装
bun add vant@^4 @vant/compat@^1
```
你也可以直接修改 `package.json``dependencies` 字段中的版本号,修改完成后需要重新安装依赖。
@@ -14,7 +14,7 @@ npm i vant
npm i vant@latest-v2
```
Using `yarn` or `pnpm`:
Using `yarn`, `pnpm`, or `bun`:
```bash
# with yarn
@@ -22,6 +22,9 @@ yarn add vant
# with pnpm
pnpm add vant
# with Bun
bun add vant
```
### CDN
@@ -126,6 +129,9 @@ yarn add unplugin-vue-components -D
# with pnpm
pnpm add unplugin-vue-components -D
# with Bun
bun add unplugin-vue-components -D
```
#### 2. Configure Plugin
@@ -235,6 +241,9 @@ yarn add @vant/nuxt -D
# with pnpm
pnpm add @vant/nuxt -D
# with Bun
bun add @vant/nuxt -D
```
#### 2. Add Module
@@ -26,6 +26,9 @@ yarn add vant
# 通过 pnpm 安装
pnpm add vant
# 通过 Bun 安装
bun add vant
```
### 通过 CDN 安装
@@ -130,6 +133,9 @@ yarn add unplugin-vue-components -D
# 通过 pnpm 安装
pnpm add unplugin-vue-components -D
# 通过 bun 安装
bun add unplugin-vue-components -D
```
#### 2. 配置插件
@@ -239,6 +245,9 @@ yarn add @vant/nuxt -D
# 通过 pnpm 安装
pnpm add @vant/nuxt -D
# 通过 Bun 安装
bun add @vant/nuxt -D
```
#### 2. 增加模块
@@ -17,6 +17,9 @@ yarn add @vant/use
# with pnpm
pnpm add @vant/use
# with Bun
bun add @vant/use
```
### Demo
@@ -17,6 +17,9 @@ yarn add @vant/use
# with pnpm
pnpm add @vant/use
# with Bun
bun add @vant/use
```
### 示例
+3
View File
@@ -63,6 +63,9 @@ yarn add @vant/area-data
# with pnpm
pnpm add @vant/area-data
# with Bun
bun add @vant/area-data
```
```ts
+3
View File
@@ -65,6 +65,9 @@ yarn add @vant/area-data
# 通过 pnpm
pnpm add @vant/area-data
# 通过 Bun
bun add @vant/area-data
```
```ts
@@ -93,6 +93,9 @@ yarn add @vant/area-data
# 通过 pnpm
pnpm add @vant/area-data
# 通过 Bun
bun add @vant/area-data
```
```html