From 3622ab48429832c72fd382db83cc9957b2430581 Mon Sep 17 00:00:00 2001 From: bowen628 Date: Sat, 14 Mar 2026 20:23:08 +0800 Subject: [PATCH] fix(build): stabilize desktop build scripts and web typecheck Keep desktop tauri commands compatible with CI environments and prevent test-only files from breaking production web type checks. Made-with: Cursor --- package.json | 16 ++++++++-------- src/web-ui/tsconfig.json | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 2d2de382..5e4e4f93 100644 --- a/package.json +++ b/package.json @@ -24,14 +24,14 @@ "prepare:mobile-web": "node scripts/mobile-web-build.cjs", "preview": "pnpm --dir src/web-ui preview", "desktop:dev": "node scripts/dev.cjs desktop", - "desktop:dev:raw": "cd src/apps/desktop && npx tauri dev", - "desktop:build": "cd src/apps/desktop && npx tauri build", - "desktop:build:fast": "cd src/apps/desktop && npx tauri build --debug --no-bundle", - "desktop:build:release-fast": "cd src/apps/desktop && npx tauri build --no-bundle -- --profile release-fast", - "desktop:build:exe": "cd src/apps/desktop && npx tauri build --no-bundle", - "desktop:build:nsis": "cd src/apps/desktop && npx tauri build --bundles nsis", - "desktop:build:arm64": "cd src/apps/desktop && npx tauri build --target aarch64-apple-darwin --bundles dmg", - "desktop:build:x86_64": "cd src/apps/desktop && npx tauri build --target x86_64-apple-darwin --bundles dmg", + "desktop:dev:raw": "cd src/apps/desktop && env CI=true npx tauri dev", + "desktop:build": "cd src/apps/desktop && env CI=true npx tauri build", + "desktop:build:fast": "cd src/apps/desktop && env CI=true npx tauri build --debug --no-bundle", + "desktop:build:release-fast": "cd src/apps/desktop && env CI=true npx tauri build --no-bundle -- --profile release-fast", + "desktop:build:exe": "cd src/apps/desktop && env CI=true npx tauri build --no-bundle", + "desktop:build:nsis": "cd src/apps/desktop && env CI=true npx tauri build --bundles nsis", + "desktop:build:arm64": "cd src/apps/desktop && env CI=true npx tauri build --target aarch64-apple-darwin --bundles dmg", + "desktop:build:x86_64": "cd src/apps/desktop && env CI=true npx tauri build --target x86_64-apple-darwin --bundles dmg", "installer:build": "pnpm --dir BitFun-Installer run installer:build", "installer:build:fast": "pnpm --dir BitFun-Installer run installer:build:fast", "installer:build:only": "pnpm --dir BitFun-Installer run installer:build:only", diff --git a/src/web-ui/tsconfig.json b/src/web-ui/tsconfig.json index dcaf0793..404852e6 100644 --- a/src/web-ui/tsconfig.json +++ b/src/web-ui/tsconfig.json @@ -36,6 +36,10 @@ }, "include": ["src"], "exclude": [ + "src/**/*.test.ts", + "src/**/*.test.tsx", + "src/**/*.spec.ts", + "src/**/*.spec.tsx", "src/**/*.example.tsx", "src/component-library/preview/**", "src/component-library/components/registry.tsx",