Skip to content

refactor: bump vitepress docs to v1.2.3 #1898

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 30 commits into
base: dev
Choose a base branch
from

Conversation

fu050409
Copy link
Collaborator

@fu050409 fu050409 commented Jun 21, 2024

重构 VitePress 至最新版

Resolved #1879

修订内容

  1. 结构性依赖更新

    在此次更新中,我们使用了更新版本的vite@4,但是没有使用vite@5,有部分依赖对vite@5没有适配,故暂时使用vite@4我已经检查了此次更新中的依赖,没有依赖冲突和任何已知的漏洞

  2. 将 VitePress 从v0.x更新至v1.2.3即最新版本

    我重构了所有 VitePress 的接口,确保它们在新版依旧正常工作。

  3. 重构 vitepress-theme-demoblock 至最新版本

    旧版本的此依赖不兼容vitepress@1,所以我将此依赖擢升至@3来确保其正常工作,我暂时使用了官方提供的Demo元件而不是我们的定制组件,我们的组件在新版中存在问题,暂时未能找到解决方案。

    注意,我将所有:::demo <comment>语法都删除了,因为官方明确表示了在新版中移除了对此语法的支持。

    吐槽一句不是很理解为什么他写了安装文档就是不写使用文档

  4. 修复了一些历史遗留问题

    在重构的过程中,修复了一些历史遗留问题,例如 Menu 组件中的文档依旧使用了对 script 标签使用了 setup 语法,这无法被正确渲染。

  5. 重构了所有lodash的导入,处理构建过程中的问题

    当前文档已可以正常使用pnpm build完成构建。

仍然存在的问题

  1. Demo 组件未能成功迁移(并不影响功能)
  2. 对国际化(英文)的支持暂时未能解决

fu050409 added 13 commits June 21, 2024 17:50
Reasons:
    1. The `demoList` is seems unsupported for latest version of vitepress
    2. The latest `vitepress-theme-demoblock` no longer support for `:::demo <comment>`

Related Issue: DevCloudFE#1879
- The latest version of `vitepress-theme-demoblock` does not support `:::demo <comment>
- With `<script setup>` tag, the vitepress will give a 404 error when trying to load the demo code.

Related Issue: DevCloudFE#1879
- vite@4 installed instead of vite@5 by virtue of requirements relations
- vitepress@latest is installed
- other updates are safe update

Related Issue: DevCloudFE#1879
@fu050409 fu050409 requested a review from GreatZPP June 21, 2024 14:23
@fu050409 fu050409 force-pushed the refactor/vitepress-docs branch from b6dc492 to 8aee49a Compare June 30, 2024 11:45
Copy link

github-actions bot commented Jul 6, 2024

PR preview has been successfully built and deployed to https://vue-devui-pr-1898.surge.sh.

Copy link

github-actions bot commented Jul 6, 2024

PR preview has been successfully built and deployed to https://vue-devui-pr-1898.surge.sh.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ [Feature]: 将VitePress迁移至最新版
1 participant