From 382599878ddcdd76ed8808a3cfde352f2fb990ad Mon Sep 17 00:00:00 2001 From: QinShower Date: Wed, 30 Oct 2024 18:46:21 +0800 Subject: [PATCH 1/2] fix pnpm run dev failed:[Error: ENAMETOOLONG: name too long, stat] --- src/.vuepress/config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/.vuepress/config.ts b/src/.vuepress/config.ts index 5fa2af3..87373d6 100644 --- a/src/.vuepress/config.ts +++ b/src/.vuepress/config.ts @@ -1,9 +1,12 @@ import { webpackBundler } from '@vuepress/bundler-webpack' import { defineUserConfig } from "vuepress"; +import { getDirname, path } from 'vuepress/utils' import theme from "./theme.js"; import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' import { registerComponentsPlugin } from '@vuepress/plugin-register-components' +const __dirname = getDirname(import.meta.url) + export default defineUserConfig({ base: "/", @@ -47,7 +50,7 @@ export default defineUserConfig({ id: 'G-CN4DXNE50P', }), registerComponentsPlugin({ - componentsDir: 'src/.vuepress/components', + componentsDir: path.resolve(__dirname, './components'), }), ], From af8238e5b165850c5d00397f78e1406f48f4130d Mon Sep 17 00:00:00 2001 From: QinShower Date: Thu, 31 Oct 2024 11:17:13 +0800 Subject: [PATCH 2/2] Update generate.sh git clone add `--depth 1` --- generate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generate.sh b/generate.sh index c84e3a0..18243af 100755 --- a/generate.sh +++ b/generate.sh @@ -10,7 +10,7 @@ cd $DOCS_DIR rm -rf java-design-patterns rm -rf patterns rm -rf zh/patterns -git clone https://github.com/iluwatar/java-design-patterns.git +git clone --depth 1 https://github.com/iluwatar/java-design-patterns.git cd java-design-patterns git checkout-index -a -f --prefix=../patterns/ cd ../patterns @@ -45,7 +45,7 @@ rm -rf patterns/localization rm -rf programming-principles rm -rf principles rm -rf zh/principles -git clone https://github.com/iluwatar/programming-principles.git +git clone --depth 1 https://github.com/iluwatar/programming-principles.git cd programming-principles git checkout-index -f --prefix=../principles/ README.md @@ -63,7 +63,7 @@ rm -rf programming-principles rm -rf 30-seconds-of-java rm -rf snippets rm -rf zh/snippets -git clone https://github.com/iluwatar/30-seconds-of-java.git +git clone --depth 1 https://github.com/iluwatar/30-seconds-of-java.git cd 30-seconds-of-java git checkout-index -f --prefix=../snippets/ README.md