From 52ef367a117b27b535c87ac63041e120d33b77dd Mon Sep 17 00:00:00 2001 From: kate522 Date: Sun, 18 Oct 2026 17:33:43 +0800 Subject: [PATCH] Drop PowerShell dev/test helper scripts in favor of make --- README.md | 11 ++++------- scripts/dev.ps1 | 13 ------------- scripts/test.ps1 | 13 ------------- 3 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 scripts/dev.ps1 delete mode 100644 scripts/test.ps1 diff --git a/README.md b/README.md index 2c94266..db8f1b9 100644 --- a/README.md +++ b/README.md @@ -12,23 +12,20 @@ ```powershell # 1. 构建网关二进制到 bin/ -powershell -File scripts/build-gateway.ps1 -# 或:go build -o bin/gateway.exe ./cmd/gateway +make build # 2. 安装前端依赖 npm install # 3. 启动桌面端(自动构建网关并启动 Tauri dev) -powershell -File scripts/dev.ps1 -# 或直接:npm run tauri dev +make dev ``` ## 测试 ```powershell -powershell -File scripts/test.ps1 # Go + 前端全部测试 -go test ./... # 仅 Go -npm test # 仅前端 +make test # Go 单元测试与集成测试 +npm test # 前端 vitest npm run typecheck ``` diff --git a/scripts/dev.ps1 b/scripts/dev.ps1 deleted file mode 100644 index 68cf9b3..0000000 --- a/scripts/dev.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -# Builds the gateway binary (when missing) and starts the Tauri dev app. -param([switch]$NoBuild) - -$ErrorActionPreference = "Stop" -$repoRoot = Split-Path -Parent $PSScriptRoot -Set-Location $repoRoot - -$gateway = Join-Path $repoRoot "bin\gateway.exe" -if (-not $NoBuild -and -not (Test-Path $gateway)) { - & (Join-Path $PSScriptRoot "build-gateway.ps1") -} - -npm run tauri dev diff --git a/scripts/test.ps1 b/scripts/test.ps1 deleted file mode 100644 index 1fc4b18..0000000 --- a/scripts/test.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -# Runs the full test suite: Go tests, then frontend vitest. -param([switch]$SkipFrontend) - -$ErrorActionPreference = "Stop" -$repoRoot = Split-Path -Parent $PSScriptRoot -Set-Location $repoRoot - -go test ./... -if ($LASTEXITCODE -ne 0) { exit 1 } - -if (-not $SkipFrontend) { - npm test -}