Skip to content

Commit f9777d4

Browse files
committed
feat: support Bun
1 parent a32d3bf commit f9777d4

File tree

5 files changed

+2116
-1
lines changed

5 files changed

+2116
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ vite.config.*.timestamp*
1313
# Logs
1414
*.log
1515

16-
# Use the pnpm
16+
# Using pnpm and bun
1717
package-lock.json
1818
yarn.lock

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ MobVue is a well-crafted mobile web app template, built with popular technologie
3232
- Install the recommended plugins in the `.vscode/extensions.json` file
3333
- `node` 20.x or 22+
3434
- `pnpm` 9.x or 10+
35+
- `bun` latest
3536

3637
</details>
3738

@@ -40,6 +41,8 @@ MobVue is a well-crafted mobile web app template, built with popular technologie
4041

4142
<br>
4243

44+
Using `Node` + `pnpm`
45+
4346
```bash
4447
# Install dependencies
4548
pnpm i
@@ -48,13 +51,23 @@ pnpm i
4851
pnpm dev
4952
```
5053

54+
Using `Bun`
55+
56+
```bash
57+
bun i
58+
59+
bun run dev
60+
```
61+
5162
</details>
5263

5364
<details>
5465
<summary>Build</summary>
5566

5667
<br>
5768

69+
Using `Node` + `pnpm`
70+
5871
```bash
5972
# Build for the staging environment
6073
pnpm build:staging
@@ -63,25 +76,43 @@ pnpm build:staging
6376
pnpm build
6477
```
6578

79+
Using `Bun`
80+
81+
```bash
82+
bun run build:staging
83+
84+
bun run build
85+
```
86+
6687
</details>
6788

6889
<details>
6990
<summary>Local Preview</summary>
7091

7192
<br>
7293

94+
Using `Node` + `pnpm`
95+
7396
```bash
7497
# Execute the build command first to generate the dist directory, then run the preview command
7598
pnpm preview
7699
```
77100

101+
Using `Bun`
102+
103+
```bash
104+
bun run preview
105+
```
106+
78107
</details>
79108

80109
<details>
81110
<summary>Code Check</summary>
82111

83112
<br>
84113

114+
Using `Node` + `pnpm`
115+
85116
```bash
86117
# Code linting and formatting
87118
pnpm lint
@@ -90,6 +121,14 @@ pnpm lint
90121
pnpm test
91122
```
92123

124+
Using `Bun`
125+
126+
```bash
127+
bun run lint
128+
129+
bun run test
130+
```
131+
93132
</details>
94133

95134
<details>
@@ -185,6 +224,8 @@ pnpm test
185224

186225
**UnoCSS**: A high-performance, flexible atomic CSS engine
187226

227+
**Bun**:a fast JavaScript runtime
228+
188229
## Project Preview Image
189230

190231
![preview](./src/common/assets/images/preview.png)

README.zh-CN.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ MobVue 是一个精心制作的移动端 H5 模板,基于 Vue3、Vite、TypeSc
3232
- 安装 `.vscode/extensions.json` 文件中推荐的插件
3333
- `node` 20.x 或 22+
3434
- `pnpm` 9.x 或 10+
35+
- `bun` 最新的
3536

3637
</details>
3738

@@ -40,6 +41,8 @@ MobVue 是一个精心制作的移动端 H5 模板,基于 Vue3、Vite、TypeSc
4041

4142
<br>
4243

44+
使用 `Node` + `pnpm`
45+
4346
```bash
4447
# 安装依赖
4548
pnpm i
@@ -48,13 +51,23 @@ pnpm i
4851
pnpm dev
4952
```
5053

54+
使用 `Bun`
55+
56+
```bash
57+
bun i
58+
59+
bun run dev
60+
```
61+
5162
</details>
5263

5364
<details>
5465
<summary>打包构建</summary>
5566

5667
<br>
5768

69+
使用 `Node` + `pnpm`
70+
5871
```bash
5972
# 打包构建预发布环境
6073
pnpm build:staging
@@ -63,25 +76,43 @@ pnpm build:staging
6376
pnpm build
6477
```
6578

79+
使用 `Bun`
80+
81+
```bash
82+
bun run build:staging
83+
84+
bun run build
85+
```
86+
6687
</details>
6788

6889
<details>
6990
<summary>本地预览</summary>
7091

7192
<br>
7293

94+
使用 `Node` + `pnpm`
95+
7396
```bash
7497
# 先执行打包构建命令生成 dist 目录后再执行以下预览命令
7598
pnpm preview
7699
```
77100

101+
使用 `Bun`
102+
103+
```bash
104+
bun run preview
105+
```
106+
78107
</details>
79108

80109
<details>
81110
<summary>代码检查</summary>
82111

83112
<br>
84113

114+
使用 `Node` + `pnpm`
115+
85116
```bash
86117
# 代码校验与格式化
87118
pnpm lint
@@ -90,6 +121,14 @@ pnpm lint
90121
pnpm test
91122
```
92123

124+
使用 `Bun`
125+
126+
```bash
127+
bun run lint
128+
129+
bun run test
130+
```
131+
93132
</details>
94133

95134
<details>
@@ -185,6 +224,8 @@ pnpm test
185224

186225
**UnoCSS**:具有高性能且极具灵活性的即时原子化 CSS 引擎
187226

227+
**Bun**:是一款快速的 JavaScript 运行时
228+
188229
## 项目预览图
189230

190231
![preview](./src/common/assets/images/preview.png)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy