diff --git a/.github/PULL_REQUEST_TEMPLATE.md.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE.md.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 00000000..c166aea9 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,16 @@ +name: Setup +description: Installs Node, Enables Corepack and caches pnpm. + +runs: + using: composite + + steps: + - name: Enable corepack + run: corepack enable + shell: bash + + - name: Setup node & pnpm + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: pnpm diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index cd369438..0988b89e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -48,32 +48,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - # Run a build step here - - name: Setup Node.js environment - uses: actions/setup-node@v2 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 9.0.5 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + - name: Setup (Install Node & pnpm) + uses: ./.github/actions/setup - name: Install dependencies run: pnpm i --frozen-lockfile diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7b1d6468..2ffab6ba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,14 +14,13 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v3 - with: - node-version: 18.x + - name: Setup (Install Node & pnpm) + uses: ./.github/actions/setup - - run: npx changelogithub + - run: pnpm dlx changelogithub env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b8e55d5f..7ed6dfa6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,31 +19,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Setup Node.js environment - uses: actions/setup-node@v2 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 9.0.5 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + - name: Setup (Install Node & pnpm) + uses: ./.github/actions/setup - name: Install dependencies run: pnpm i --frozen-lockfile diff --git a/.vscode/settings.json b/.vscode/settings.json index 27bf7fcd..e1a2d038 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,9 @@ { "vue.server.hybridMode": true, + "vue.server.includeLanguages": [ + "vue", + "markdown" + ], "prettier.enable": false, "editor.formatOnSave": false, "editor.codeActionsOnSave": { diff --git a/apps/www/.vitepress/config.mts b/apps/www/.vitepress/config.mts index d729444e..7399caab 100644 --- a/apps/www/.vitepress/config.mts +++ b/apps/www/.vitepress/config.mts @@ -3,9 +3,9 @@ import { defineConfig } from 'vitepress' import Icons from 'unplugin-icons/vite' import tailwind from 'tailwindcss' import autoprefixer from 'autoprefixer' +import { transformerMetaWordHighlight } from '@shikijs/transformers' import { cssVariables } from './theme/config/shiki' -// import { transformerMetaWordHighlight, transformerNotationWordHighlight } from '@shikijs/transformers' import { siteConfig } from './theme/config/site' import ComponentPreviewPlugin from './theme/plugins/previewer' import CodeWrapperPlugin from './theme/plugins/codewrapper' @@ -56,8 +56,7 @@ export default defineConfig({ markdown: { theme: cssVariables, codeTransformers: [ - // transformerMetaWordHighlight(), - // transformerNotationWordHighlight(), + transformerMetaWordHighlight(), ], config(md) { md.use(ComponentPreviewPlugin) @@ -77,7 +76,7 @@ export default defineConfig({ }, }, plugins: [ - Icons({ compiler: 'vue3', autoInstall: true }), + Icons({ compiler: 'vue3', autoInstall: true }) as any, ], resolve: { alias: { diff --git a/apps/www/.vitepress/theme/components/ComponentPreview.vue b/apps/www/.vitepress/theme/components/ComponentPreview.vue index bcf9629b..cca57a58 100644 --- a/apps/www/.vitepress/theme/components/ComponentPreview.vue +++ b/apps/www/.vitepress/theme/components/ComponentPreview.vue @@ -1,7 +1,8 @@