优化:优化 package.json 文件,去除无用配置(将 VitePress 版本升级为 v1.0.0-alpha.18)
This commit is contained in:
14
README.md
14
README.md
@@ -24,17 +24,19 @@
|
||||
git clone https://github.com/Charles7c/charles7c.github.io.git
|
||||
# 2.安装 PNPM
|
||||
npm install pnpm -g
|
||||
# 3.安装依赖
|
||||
# 3.设置淘宝镜像源
|
||||
pnpm config set registry https://registry.npmmirror.com/
|
||||
# 4.安装依赖
|
||||
pnpm install
|
||||
# 4.dev 运行,访问:http://localhost:5173
|
||||
# 5.dev 运行,访问:http://localhost:5173
|
||||
pnpm dev
|
||||
# 5.打包,文件存放位置:docs/.vitepress/dist
|
||||
# 6.打包,文件存放位置:docs/.vitepress/dist
|
||||
# 如果是部署到 GitHub Pages,可以利用 GitHub Actions,在 push 到 GitHub 后自动部署打包
|
||||
# 详情见:.github/workflows/deploy-pages.yml,根据个人需要删减工作流配置
|
||||
pnpm build
|
||||
# 6.部署
|
||||
# 6.1 push 到 GitHub 仓库,部署到 GitHub Pages:需要在仓库设置中启用 GitHub Pages(本仓库采用此种部署方式)
|
||||
# 6.2 在其他平台部署, 例如:Gitee Pages、Vercel、Netlify、个人虚拟主机、个人服务器等
|
||||
# 7.部署
|
||||
# 7.1 push 到 GitHub 仓库,部署到 GitHub Pages:需要在仓库设置中启用 GitHub Pages(本仓库采用此种部署方式)
|
||||
# 7.2 在其他平台部署, 例如:Gitee Pages、Vercel、Netlify、个人虚拟主机、个人服务器等
|
||||
```
|
||||
|
||||
## 已扩展功能(持续优化细节)
|
||||
|
@@ -1,8 +1,11 @@
|
||||
import { defineConfig } from 'vite'
|
||||
//import { SearchPlugin } from 'vitepress-plugin-search'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import { ArcoResolver } from 'unplugin-vue-components/resolvers'
|
||||
|
||||
export default {
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
//SearchPlugin(),
|
||||
Components({
|
||||
dirs: ['.vitepress/theme/components'],
|
||||
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
||||
@@ -10,4 +13,4 @@ export default {
|
||||
})
|
||||
],
|
||||
ssr: { noExternal: ['@arco-design/web-vue'] }
|
||||
}
|
||||
})
|
38
package.json
38
package.json
@@ -1,31 +1,29 @@
|
||||
{
|
||||
"name": "my-repos",
|
||||
"version": "1.0.0",
|
||||
"description": "Charles's personal knowledge repositories.",
|
||||
"main": "index.js",
|
||||
"author": "Charles7c",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "node collect-article-data.mjs && vitepress dev docs",
|
||||
"build": "node collect-article-data.mjs && vitepress build docs",
|
||||
"serve": "vitepress serve docs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arco-design/web-vue": "^2.37.4",
|
||||
"markdown-it": "^13.0.1",
|
||||
"mermaid": "^9.1.7",
|
||||
"unplugin-vue-components": "^0.22.7",
|
||||
"vitepress": "^1.0.0-alpha.17",
|
||||
"vue": "^3.2.39"
|
||||
"vite": "^3.1.4",
|
||||
"vitepress": "1.0.0-alpha.18",
|
||||
"vitepress-plugin-mermaid": "^2.0.8",
|
||||
"vitepress-plugin-search": "1.0.4-alpha.11",
|
||||
"vue": "^3.2.40"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g2plot": "^2.4.20",
|
||||
"@arco-design/web-vue": "^2.37.3",
|
||||
"blueimp-md5": "^2.19.0",
|
||||
"dayjs": "^1.11.5",
|
||||
"fast-glob": "^3.2.12",
|
||||
"gitalk": "^1.8.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"jquery": "^3.6.1",
|
||||
"mermaid": "^9.1.7",
|
||||
"vitepress-plugin-mermaid": "^2.0.8"
|
||||
"jquery": "^3.6.1"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
@@ -33,21 +31,5 @@
|
||||
"@algolia/client-search"
|
||||
]
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"blog",
|
||||
"charles7c",
|
||||
"vitepress-blog",
|
||||
"vitepress",
|
||||
"vuepress",
|
||||
"vite",
|
||||
"vue"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Charles7c/charles7c.github.io.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Charles7c/charles7c.github.io/issues"
|
||||
}
|
||||
}
|
||||
|
673
pnpm-lock.yaml
generated
673
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user