Skip to content

Commit

Permalink
Merge branch 'main' into theme-hope
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 11, 2024
2 parents 81ab80b + 0dcc2fb commit 1f6266e
Show file tree
Hide file tree
Showing 10 changed files with 2,791 additions and 2,354 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm lint-staged
pnpm nano-staged
2 changes: 1 addition & 1 deletion docs/guide/bundler.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ icon: fa6-solid:boxes-packing

# Bundler

VuePress supports using [Webpack](https://webpack.js.org/) or [Vite](https://vitejs.dev/) to dev and build sites. You can choose which bundler to use according to your preference, and no extra configuration is required.
VuePress supports using [Webpack](https://webpack.js.org/) or [Vite](https://vite.dev/) to dev and build sites. You can choose which bundler to use according to your preference, and no extra configuration is required.

## Install a Bundler

Expand Down
14 changes: 6 additions & 8 deletions docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,19 @@ jobs:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# choose pnpm version to use
version: 8
# install deps with pnpm
run_install: true
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
# choose node.js version to use
node-version: 20
node-version: 22
# cache deps for pnpm
cache: pnpm

- name: Install deps
run: pnpm install --frozen-lockfile

# run build script
- name: Build VuePress site
run: pnpm docs:build
Expand Down Expand Up @@ -217,7 +215,7 @@ See [Edgio Documentation > Framework Guides > VuePress](https://docs.edg.io/guid

2. Set [Environment variables](https://docs.netlify.com/configure-builds/environment-variables) to choose node version:

- `NODE_VERSION`: 18
- `NODE_VERSION`: 20

3. Hit the deploy button.

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/bundler/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default defineUserConfig({
Accepts all options of Vite.

- Also see:
- [Vite > Config](https://vitejs.dev/config/)
- [Vite > Config](https://vite.dev/config/)

### vuePluginOptions

Expand All @@ -48,4 +48,4 @@ export default defineUserConfig({
Accepts all options of [@vitejs/plugin-vue](https://www.npmjs.com/package/@vitejs/plugin-vue).

- Also see:
- [Vite > Plugins > Official Plugins](https://vitejs.dev/plugins/#vitejs-plugin-vue)
- [Vite > Plugins > Official Plugins](https://vite.dev/plugins/#vitejs-plugin-vue)
2 changes: 1 addition & 1 deletion docs/zh/guide/bundler.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ icon: fa6-solid:boxes-packing

# 打包工具

VuePress 支持使用 [Vite](https://vitejs.dev/)[Webpack](https://webpack.js.org/) 作为打包工具来进行网站的开发和构建。你可以根据自己的喜好来选择使用哪个打包工具,并且不需要进行额外的配置。
VuePress 支持使用 [Vite](https://vite.dev/)[Webpack](https://webpack.js.org/) 作为打包工具来进行网站的开发和构建。你可以根据自己的喜好来选择使用哪个打包工具,并且不需要进行额外的配置。

## 安装打包工具

Expand Down
22 changes: 10 additions & 12 deletions docs/zh/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,27 @@ jobs:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# 选择要使用的 pnpm 版本
version: 8
# 使用 pnpm 安装依赖
run_install: true
- name: 设置 pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
# 选择要使用的 node 版本
node-version: 20
node-version: 22
# 缓存 pnpm 依赖
cache: pnpm

- name: 安装依赖
run: pnpm install --frozen-lockfile

# 运行构建脚本
- name: Build VuePress site
- name: 构建 VuePress 站点
run: pnpm docs:build

# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
- name: 部署到 GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
# 部署到 gh-pages 分支
Expand Down Expand Up @@ -217,7 +215,7 @@ heroku login

2. 设置 [Environment variables](https://docs.netlify.com/configure-builds/environment-variables) 来选择 Node 版本:

- `NODE_VERSION`: 18
- `NODE_VERSION`: 20

3. 点击 deploy 按钮。

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/reference/bundler/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default defineUserConfig({
接收 Vite 的所有配置项。

- 参考:
- [Vite > Config](https://cn.vitejs.dev/config/)
- [Vite > Config](https://cn.vite.dev/config/)

### vuePluginOptions

Expand All @@ -48,4 +48,4 @@ export default defineUserConfig({
接收 [@vitejs/plugin-vue](https://www.npmjs.com/package/@vitejs/plugin-vue) 的所有配置项。

- 参考:
- [Vite > 插件 > 官方插件](https://cn.vitejs.dev/plugins/#vitejsplugin-vue)
- [Vite > 插件 > 官方插件](https://cn.vite.dev/plugins/#vitejsplugin-vue)
51 changes: 26 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@commitlint/config-conventional"
]
},
"lint-staged": {
"nano-staged": {
"*.!(cjs|js|ts|vue)": "prettier --write --ignore-unknown",
"*.(cjs|js|ts|vue)": [
"eslint --fix",
Expand All @@ -30,36 +30,37 @@
},
"prettier": "prettier-config-vuepress",
"dependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.15",
"@vuepress/bundler-webpack": "2.0.0-rc.15",
"@vuepress/plugin-docsearch": "2.0.0-rc.47",
"@vuepress/plugin-google-analytics": "2.0.0-rc.42",
"@vuepress/plugin-register-components": "2.0.0-rc.44",
"@vuepress/plugin-shiki": "2.0.0-rc.47",
"@vuepress/theme-default": "2.0.0-rc.49",
"@vuepress/bundler-vite": "2.0.0-rc.18",
"@vuepress/bundler-webpack": "2.0.0-rc.18",
"@vuepress/plugin-docsearch": "2.0.0-rc.65",
"@vuepress/plugin-google-analytics": "2.0.0-rc.63",
"@vuepress/plugin-register-components": "2.0.0-rc.54",
"@vuepress/plugin-shiki": "2.0.0-rc.65",
"@vuepress/theme-default": "2.0.0-rc.65",
"http-server": "^14.1.1",
"sass-embedded": "^1.79.3",
"sass-loader": "^16.0.2",
"vue": "^3.5.8",
"vuepress": "2.0.0-rc.15",
"vuepress-theme-hope": "2.0.0-rc.56"
"sass-embedded": "^1.82.0",
"sass-loader": "^16.0.4",
"vue": "^3.5.13",
"vuepress": "2.0.0-rc.18",
"vuepress-theme-hope": "2.0.0-rc.63"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"bumpp": "^9.5.2",
"eslint": "^9.11.0",
"eslint-config-vuepress": "^5.2.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"@commitlint/cli": "^19.6.0",
"@commitlint/config-conventional": "^19.6.0",
"bumpp": "^9.9.0",
"eslint": "^9.16.0",
"eslint-config-vuepress": "^5.2.3",
"husky": "^9.1.7",
"nano-staged": "^0.8.0",
"prettier": "^3.4.2",
"prettier-config-vuepress": "^5.0.0",
"rimraf": "^6.0.1",
"sort-package-json": "^2.10.1",
"tsconfig-vuepress": "^5.2.0",
"typescript": "^5.6.2"
"sort-package-json": "^2.12.0",
"taze": "^0.18.0",
"tsconfig-vuepress": "^5.2.1",
"typescript": "^5.7.2"
},
"packageManager": "pnpm@9.11.0",
"packageManager": "pnpm@9.15.0",
"engines": {
"node": ">=18.19.0"
}
Expand Down
Loading

0 comments on commit 1f6266e

Please sign in to comment.