diff --git a/blogPublish.ps1 b/WinBlogPublish.ps1 similarity index 100% rename from blogPublish.ps1 rename to WinBlogPublish.ps1 diff --git a/docs/DEV-TIPS/index.md b/docs/DEV-TIPS/index.md deleted file mode 100644 index f5ab974c3..000000000 --- a/docs/DEV-TIPS/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# DEV-TIPS -- [China-mirror 中国镜像](./China-mirror.md) -- [npm config China](./npm-config-china.md) diff --git a/docs/DEV-TIPS/npm-config-china.md b/docs/DEV-TIPS/npm-config-china.md deleted file mode 100644 index b37ec865e..000000000 --- a/docs/DEV-TIPS/npm-config-china.md +++ /dev/null @@ -1,15 +0,0 @@ -# npm config China - -中国开发者的npm配置 - -```shell -npm config set registry https://registry.npmmirror.com -pm set audit false -``` - -或者使用nrm自由切换镜像 - -[nrm](https://www.npmjs.com/package/nrm) -```shell -npm install -g nrm -``` diff --git "a/docs/Web\345\274\200\345\217\221/index.md" "b/docs/Web\345\274\200\345\217\221/index.md" index d28f94e78..260445a67 100644 --- "a/docs/Web\345\274\200\345\217\221/index.md" +++ "b/docs/Web\345\274\200\345\217\221/index.md" @@ -1,4 +1,9 @@ # Web开发 +- [npm设置查看镜像](./npm设置查看镜像.md) +- [nrm前端镜像管理](./nrm前端镜像管理.md) +- [yrm前端镜像管理](./yrm前端镜像管理.md) +- [npm安装yarn](./npm安装yarn设置镜像.md) +- [npm安装pnpm](./npm安装pnpm设置镜像.md) - [pnpm-缺少各种loader思路](./pnpm-缺少各种loader思路.md) - [yarn报错registry.nlark.com连不上](./yarn报错registry.nlark.com连不上.md) - [npm发布软件包](./npm发布软件包.md) diff --git "a/docs/Web\345\274\200\345\217\221/npm\345\256\211\350\243\205pnpm\350\256\276\347\275\256\351\225\234\345\203\217.md" "b/docs/Web\345\274\200\345\217\221/npm\345\256\211\350\243\205pnpm\350\256\276\347\275\256\351\225\234\345\203\217.md" new file mode 100644 index 000000000..e20529494 --- /dev/null +++ "b/docs/Web\345\274\200\345\217\221/npm\345\256\211\350\243\205pnpm\350\256\276\347\275\256\351\225\234\345\203\217.md" @@ -0,0 +1,35 @@ +# npm安装pnpm + +## 参考官网 + +https://pnpm.io/installation#using-npm + +版本兼容性 + +pnpm7 >= node14 + +pnpm8 >= node16 + +pnpm9 >= node18 + +## 安装pnpm + +```bash +pnpm install -g pnpm@8 +which pnpm +``` + +## 查看和设置镜像 + +查询下载源 +```bash +pnpm get registry +``` +设置为国内镜像 +```bash +pnpm config set registry https://registry.npmmirror.com +``` +设置为官方镜像 +```bash +pnpm config set registry https://registry.npmjs.org/ +``` diff --git "a/docs/Web\345\274\200\345\217\221/npm\345\256\211\350\243\205yarn\350\256\276\347\275\256\351\225\234\345\203\217.md" "b/docs/Web\345\274\200\345\217\221/npm\345\256\211\350\243\205yarn\350\256\276\347\275\256\351\225\234\345\203\217.md" new file mode 100644 index 000000000..f7afae332 --- /dev/null +++ "b/docs/Web\345\274\200\345\217\221/npm\345\256\211\350\243\205yarn\350\256\276\347\275\256\351\225\234\345\203\217.md" @@ -0,0 +1,28 @@ +# npm安装yarn + +## 参考官网 + +https://classic.yarnpkg.com/en/docs/install#debian-stable + + +## 安装pnpm + +```bash +npm install -g yarn +which yarn +``` + +## 查看和设置镜像 + +查询下载源 +```bash +yarn config get registry +``` +设置为国内镜像 +```bash +yarn config set registry https://registry.npmmirror.com +``` +设置为官方镜像 +```bash +yarn config set registry https://registry.yarnpkg.com +``` \ No newline at end of file diff --git "a/docs/Web\345\274\200\345\217\221/npm\350\256\276\347\275\256\346\237\245\347\234\213\351\225\234\345\203\217.md" "b/docs/Web\345\274\200\345\217\221/npm\350\256\276\347\275\256\346\237\245\347\234\213\351\225\234\345\203\217.md" new file mode 100644 index 000000000..48bfc00a3 --- /dev/null +++ "b/docs/Web\345\274\200\345\217\221/npm\350\256\276\347\275\256\346\237\245\347\234\213\351\225\234\345\203\217.md" @@ -0,0 +1,14 @@ +# npm设置查看镜像 + +## 查询下载源 +```shell +npm get registry +``` +## 设置为国内镜像 +```shell +npm config set registry https://registry.npmmirror.com +``` +## 设置为官方镜像 +```shell +npm config set registry https://registry.npmjs.org/ +``` \ No newline at end of file diff --git "a/docs/Web\345\274\200\345\217\221/nrm\345\211\215\347\253\257\351\225\234\345\203\217\347\256\241\347\220\206.md" "b/docs/Web\345\274\200\345\217\221/nrm\345\211\215\347\253\257\351\225\234\345\203\217\347\256\241\347\220\206.md" new file mode 100644 index 000000000..51576491a --- /dev/null +++ "b/docs/Web\345\274\200\345\217\221/nrm\345\211\215\347\253\257\351\225\234\345\203\217\347\256\241\347\220\206.md" @@ -0,0 +1,17 @@ +# nrm前端镜像管理 + +使用nrm自由切换镜像 +```shell +npm install -g nrm +``` +## 镜像列表 + +```shell +nrm ls +``` + +## 切换镜像 + +```shell +nrm use taobao +``` \ No newline at end of file diff --git "a/docs/Web\345\274\200\345\217\221/yrm\345\211\215\347\253\257\351\225\234\345\203\217\347\256\241\347\220\206.md" "b/docs/Web\345\274\200\345\217\221/yrm\345\211\215\347\253\257\351\225\234\345\203\217\347\256\241\347\220\206.md" new file mode 100644 index 000000000..5679849da --- /dev/null +++ "b/docs/Web\345\274\200\345\217\221/yrm\345\211\215\347\253\257\351\225\234\345\203\217\347\256\241\347\220\206.md" @@ -0,0 +1,17 @@ +# yrm前端镜像管理 + +使用yrm自由切换镜像 +```shell +npm install -g yrm +``` +## 镜像列表 + +```shell +yrm ls +``` + +## 切换镜像 + +```shell +yrm use taobao +``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 44ef2f290..cac2ce3c2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,6 @@ # 目录 +- [开发工具技巧](./开发工具技巧/) +- [Web开发](./Web开发/) - [服务器](./服务器/服务器.md) - [赞助和推广](./赞助和推广/) - [兴趣](./兴趣/) @@ -6,10 +8,8 @@ - [python相关](./python相关/) - [LLM相关](./LLM相关/) - [Linux系统](./Linux系统/) -- [开发工具技巧](./开发工具技巧/) - [Java语言相关](./Java语言相关/) - [Git版本管理](./Git版本管理/) -- [Web开发](./Web开发/) - [安卓](./安卓/) - [生活记录](./生活记录/) - [社会认知](./社会认知/) @@ -21,7 +21,6 @@ - [Nginx](./Nginx/) - [NodeJS学习](./NodeJS学习/) - [Windows系统](./Windows系统/) -- [DEV-TIPS](./DEV-TIPS/) - [About](./public/public.md) - [代码质量](./代码质量/) - [英语](./英语/) diff --git a/docs/vite.config.js b/docs/vite.config.js index 95669d20e..5b8de8644 100644 --- a/docs/vite.config.js +++ b/docs/vite.config.js @@ -1,5 +1,7 @@ //vite.config.js import { defineConfig } from "vite"; +import { splitVendorChunkPlugin } from 'vite' + export default defineConfig({ base: "./", @@ -9,6 +11,7 @@ export default defineConfig({ disableHostCheck: true, }, plugins: [ + splitVendorChunkPlugin() ], assetsInclude: ['**/*.PNG','**/*.JPG'] }); diff --git "a/docs/\345\274\200\345\217\221\345\267\245\345\205\267\346\212\200\345\267\247/index.md" "b/docs/\345\274\200\345\217\221\345\267\245\345\205\267\346\212\200\345\267\247/index.md" index 793ad83d0..cc323d592 100644 --- "a/docs/\345\274\200\345\217\221\345\267\245\345\205\267\346\212\200\345\267\247/index.md" +++ "b/docs/\345\274\200\345\217\221\345\267\245\345\205\267\346\212\200\345\267\247/index.md" @@ -1,3 +1,4 @@ # 开发工具技巧 +- [常用中国镜像站点](./常用中国镜像站点.md) - [IDEA关闭jdk下载和jdk更新检查](./IDEA关闭jdk下载和jdk更新检查.md) - [IDEA如何管理前后端并注册为方便启停服务](./IDEA如何管理前后端并注册为方便启停服务.md) diff --git a/docs/DEV-TIPS/China-mirror.md "b/docs/\345\274\200\345\217\221\345\267\245\345\205\267\346\212\200\345\267\247/\345\270\270\347\224\250\344\270\255\345\233\275\351\225\234\345\203\217\347\253\231\347\202\271.md" similarity index 87% rename from docs/DEV-TIPS/China-mirror.md rename to "docs/\345\274\200\345\217\221\345\267\245\345\205\267\346\212\200\345\267\247/\345\270\270\347\224\250\344\270\255\345\233\275\351\225\234\345\203\217\347\253\231\347\202\271.md" index 0a909faf2..a68128b99 100644 --- a/docs/DEV-TIPS/China-mirror.md +++ "b/docs/\345\274\200\345\217\221\345\267\245\345\205\267\346\212\200\345\267\247/\345\270\270\347\224\250\344\270\255\345\233\275\351\225\234\345\203\217\347\253\231\347\202\271.md" @@ -1,38 +1,38 @@ -# China-mirror 中国镜像 - -## AliYun mirror - -https://developer.aliyun.com/mirror/ - -## NetEase - -https://mirrors.163.com/ - -## tencent - -https://mirrors.tencent.com/ - -## bytedance - -https://mirrorvolc.volces.com/ - - -## huawei cloud - -https://mirrors.huaweicloud.com/home - - -## tsinghua -https://mirrors.tuna.tsinghua.edu.cn/ - -## ustc -http://mirrors.ustc.edu.cn/ - -## bjtu -https://mirror.bjtu.edu.cn/ - -## zju -http://mirrors.zju.edu.cn/ - -## neusoft -http://mirrors.neusoft.edu.cn/ +# 常用中国镜像站点 + +## AliYun mirror + +https://developer.aliyun.com/mirror/ + +## NetEase + +https://mirrors.163.com/ + +## tencent + +https://mirrors.tencent.com/ + +## bytedance + +https://mirrorvolc.volces.com/ + + +## huawei cloud + +https://mirrors.huaweicloud.com/home + + +## tsinghua +https://mirrors.tuna.tsinghua.edu.cn/ + +## ustc +http://mirrors.ustc.edu.cn/ + +## bjtu +https://mirror.bjtu.edu.cn/ + +## zju +http://mirrors.zju.edu.cn/ + +## neusoft +http://mirrors.neusoft.edu.cn/ diff --git a/package.json b/package.json index b377946e8..c8beb03dc 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "markdown-it": "13.0.1", "moment": "2.29.4", "vite": "4.4.9", + "vite-plugin-chunk-split": "^0.5.0", "vitepress": "1.3.4", "vue": "3.3.4" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3dfdcd47..7b9fa480e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,6 +33,9 @@ importers: vite: specifier: 4.4.9 version: 4.4.9 + vite-plugin-chunk-split: + specifier: ^0.5.0 + version: 0.5.0(vite@4.4.9) vitepress: specifier: 1.3.4 version: 1.3.4(@algolia/client-search@4.23.3)(axios@1.4.0)(postcss@8.4.47)(search-insights@2.13.0)(typescript@5.4.5) @@ -922,6 +925,9 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -1081,6 +1087,9 @@ packages: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} + import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -1465,6 +1474,11 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + vite-plugin-chunk-split@0.5.0: + resolution: {integrity: sha512-pasNKLhH+ICjoCF6HoKKvgmZ1LEPSCIKAa8Lz0ZpMyQC9bLmCLT7UxgKMULewsc9SUw89OX0udsGiIQCtr8wLA==} + peerDependencies: + vite: ^4 || ^5 + vite-plugin-vitepress-auto-index@1.1.16: resolution: {integrity: sha512-VpIgiRihGLU5vKbmpE2EGUetfN2AX/IhPeFQb5Nj6BmePseX+EPwd+tjSyqnyjLZH3SFgCPC41RgFrHbJv9kSg==} peerDependencies: @@ -2382,6 +2396,8 @@ snapshots: entities@4.5.0: {} + es-module-lexer@1.5.4: {} + esbuild@0.18.20: optionalDependencies: '@esbuild/android-arm': 0.18.20 @@ -2626,6 +2642,8 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 + import-meta-resolve@4.1.0: {} + imurmurhash@0.1.4: {} inflight@1.0.6: @@ -2996,6 +3014,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 + vite-plugin-chunk-split@0.5.0(vite@4.4.9): + dependencies: + es-module-lexer: 1.5.4 + import-meta-resolve: 4.1.0 + magic-string: 0.30.11 + vite: 4.4.9 + vite-plugin-vitepress-auto-index@1.1.16(eslint@8.57.0)(typescript@5.4.5)(vite@4.4.9)(vitepress@1.3.4(@algolia/client-search@4.23.3)(axios@1.4.0)(postcss@8.4.47)(search-insights@2.13.0)(typescript@5.4.5)): dependencies: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.4.5)