From 60b7c759aa6e5b56eb60898102eaedffe660de8b Mon Sep 17 00:00:00 2001 From: LY-Xiang <74460076+LY-Xiang@users.noreply.github.com> Date: Sun, 11 Jan 2026 02:08:49 +0800 Subject: [PATCH] Update somethings --- .github/workflows/deploy.yml | 6 +- .github/workflows/lint.yml | 39 +- docs/.vitepress/nscfg.mts | 2 +- .../theme/components/CodeCompare.vue | 16 +- docs/.vitepress/theme/components/Quiz.vue | 131 +- docs/.vitepress/theme/components/Term.vue | 119 +- .../theme/components/TerminalWindow.vue | 23 +- docs/.vitepress/theme/index.ts | 2 +- docs/.vitepress/theme/style/var.css | 15 +- docs/public/maps/Frontend.html | 6024 ++++++++++- ...06\346\236\220\347\256\227\346\263\225.md" | 121 +- ...22\345\272\217\347\256\227\346\263\225.md" | 116 +- ...23\344\270\255\347\232\204\345\256\217.md" | 12 +- ...47\346\265\213\350\257\225\345\256\217.md" | 30 +- .../16_1_ctype.md" | 73 +- ...26\347\250\213\344\271\213\345\211\215.md" | 63 +- ...5\347\232\204C\347\250\213\345\272\217.md" | 73 +- ...62\345\255\227\351\235\242\351\207\217.md" | 1 + .../\345\211\215\347\253\257.md" | 35 +- ...04\344\273\266\345\261\225\347\244\272.md" | 103 +- package.json | 19 +- pnpm-lock.yaml | 8917 +++++++++++------ pnpm-workspace.yaml | 3 + 23 files changed, 12232 insertions(+), 3711 deletions(-) create mode 100644 pnpm-workspace.yaml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8e964a4f..69d58fe5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,16 +26,13 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v4 - with: - version: 10 - name: Setup Node uses: actions/setup-node@v6 with: node-version-file: package.json check-latest: true - cache: 'pnpm' - package-manager-cache: false + cache: pnpm - name: Setup Pages uses: actions/configure-pages@v5 @@ -45,6 +42,7 @@ jobs: - name: Build with VitePress run: pnpm run docs:build + - name: Upload artifact uses: actions/upload-pages-artifact@v4 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5192ac0a..cb970309 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,38 +26,18 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' + - name: Setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup Node uses: actions/setup-node@v6 with: node-version-file: package.json check-latest: true - #cache: yarn - package-manager-cache: false - - - name: Setup yarn - run: | - corepack enable - yarn set version stable + cache: pnpm - - name: Get yarn cachedir - id: yarn-cachedir - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - name: Cache yarn - uses: actions/cache@v5 - with: - path: ${{ steps.yarn-cachedir.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies (yarn) - run: yarn install - - - name: Cache apt - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: clang-format-19 clang-tidy-19 - execute_install_scripts: true + - name: Install dependencies (pnpm) + run: pnpm install - name: Cpp Lint (clang-format & clang-tidy) uses: cpp-linter/cpp-linter-action@v2 @@ -66,16 +46,16 @@ jobs: with: style: file thread-comments: update - version: 19 + # version: 19 files-changed-only: false continue-on-error: true - name: ESLint (+vue +prettier +ts) - run: yarn run eslint --fix --ignore-pattern .gitignore + run: pnpm exec eslint --fix --ignore-pattern .gitignore continue-on-error: true - name: Prettier - run: yarn run prettier --write . + run: pnpm exec prettier --write . continue-on-error: true - name: Markdown Lint @@ -89,7 +69,6 @@ jobs: - name: Autocorrect Fix uses: huacnlee/autocorrect-action@v2 with: - use_npm: true args: --fix continue-on-error: true diff --git a/docs/.vitepress/nscfg.mts b/docs/.vitepress/nscfg.mts index 8d6d0497..bf643fb0 100644 --- a/docs/.vitepress/nscfg.mts +++ b/docs/.vitepress/nscfg.mts @@ -15,7 +15,7 @@ export const Nav: DefaultTheme.NavItem[] = [ { text: "组件展示", link: "/杂项/组件展示", - } + }, ]; export const Sidebar: DefaultTheme.Sidebar = { "/教程/正文/": [ diff --git a/docs/.vitepress/theme/components/CodeCompare.vue b/docs/.vitepress/theme/components/CodeCompare.vue index ea297b4c..5bfa9737 100644 --- a/docs/.vitepress/theme/components/CodeCompare.vue +++ b/docs/.vitepress/theme/components/CodeCompare.vue @@ -4,19 +4,19 @@ defineProps({ // 左侧标题,默认 "Bad" leftTitle: { type: String, - default: '错误写法 (Bad)' + default: "错误写法 (Bad)", }, // 右侧标题,默认 "Good" rightTitle: { type: String, - default: '正确写法 (Good)' + default: "正确写法 (Good)", }, // 是否为垂直布局(可选强制垂直) vertical: { type: Boolean, - default: false - } -}) + default: false, + }, +});