From b255a037d62eaffebb91bbdeaba38a2988fdd830 Mon Sep 17 00:00:00 2001 From: xuqingkai Date: Sun, 7 Jan 2024 01:33:01 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=9A=80=20=E8=B0=83=E6=95=B4workf?= =?UTF-8?q?lows=E4=BD=BF=E7=94=A8pnpm=E5=AE=89=E8=A3=85=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/alipay.yml | 9 ++++++--- .github/workflows/npm-publish.yml | 4 +++- .github/workflows/oss.yml | 9 ++++++--- .github/workflows/weixin.yml | 9 ++++++--- docs/.vitepress/theme/components/CustomFooter.vue | 4 ++-- docs/.vitepress/theme/components/frame.vue | 4 ++-- .../components/wd-collapse/wd-collapse.vue | 4 ++-- 7 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/alipay.yml b/.github/workflows/alipay.yml index f785988d..65e5ee2d 100644 --- a/.github/workflows/alipay.yml +++ b/.github/workflows/alipay.yml @@ -37,10 +37,13 @@ jobs: }' > .minicirc fi - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Install pnpm + run: corepack enable + + - uses: actions/setup-node@v3 with: - node-version: "14.x" + node-version: '18' + cache: 'pnpm' - name: upload diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 21c0f573..26afccb9 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -18,7 +18,9 @@ jobs: registry-url: https://registry.npmjs.org - name: Install Dependencies - run: pnpm + run: | + npm install pnpm -g + pnpm install - name: Run Compiler run: pnpm compiler diff --git a/.github/workflows/oss.yml b/.github/workflows/oss.yml index 56ba2c17..4098118a 100644 --- a/.github/workflows/oss.yml +++ b/.github/workflows/oss.yml @@ -12,11 +12,14 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 + + - name: Install pnpm + run: corepack enable - - name: 设置 Node.js 18.x 环境 - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: - node-version: '18.x' + node-version: '18' + cache: 'pnpm' - name: Install Dependencies and Build Docs run: | diff --git a/.github/workflows/weixin.yml b/.github/workflows/weixin.yml index 46100a7a..f645e031 100644 --- a/.github/workflows/weixin.yml +++ b/.github/workflows/weixin.yml @@ -41,10 +41,13 @@ jobs: }' > .minicirc fi - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Install pnpm + run: corepack enable + + - uses: actions/setup-node@v3 with: - node-version: "14.x" + node-version: '18' + cache: 'pnpm' - name: upload diff --git a/docs/.vitepress/theme/components/CustomFooter.vue b/docs/.vitepress/theme/components/CustomFooter.vue index 44e84335..bc019333 100644 --- a/docs/.vitepress/theme/components/CustomFooter.vue +++ b/docs/.vitepress/theme/components/CustomFooter.vue @@ -4,11 +4,11 @@ import { useSidebar } from 'vitepress/dist/client/theme-default/composables/side import { computed } from 'vue'; -const { theme, frontmatter } = useData() +const { theme } = useData() const { hasSidebar } = useSidebar() const copyright = computed(()=>{ - const isNetlify = location.href.includes('netlify') + const isNetlify = typeof window !== 'undefined' ? window.location.href.includes('netlify') : false if (!isNetlify) { return `${theme.value.footer.copyright} | This site is powered by Netlify` }else{ diff --git a/docs/.vitepress/theme/components/frame.vue b/docs/.vitepress/theme/components/frame.vue index 5706143f..a4b8160c 100644 --- a/docs/.vitepress/theme/components/frame.vue +++ b/docs/.vitepress/theme/components/frame.vue @@ -4,8 +4,8 @@