diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index 3b98772e..af4f5dcb 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -25,8 +25,6 @@ jobs: cache-dependency-path: "web/pnpm-lock.yaml" - run: pnpm install working-directory: web - - run: pnpm type-gen - working-directory: web - name: Run eslint check run: pnpm lint working-directory: web @@ -45,8 +43,6 @@ jobs: cache-dependency-path: "web/pnpm-lock.yaml" - run: pnpm install working-directory: web - - run: pnpm type-gen - working-directory: web - name: Run frontend build run: pnpm build working-directory: web diff --git a/Dockerfile b/Dockerfile index a0a3aa47..82278038 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY . . WORKDIR /frontend-build/web -RUN corepack enable && pnpm i --frozen-lockfile && pnpm type-gen +RUN corepack enable && pnpm i --frozen-lockfile RUN pnpm build diff --git a/docs/development.md b/docs/development.md index 807a7f68..53511ab9 100644 --- a/docs/development.md +++ b/docs/development.md @@ -30,7 +30,7 @@ Memos is built with a curated tech stack. It is optimized for developer experien 3. Install frontend dependencies and generate TypeScript code from protobuf ``` - cd web && pnpm i && pnpm type-gen + cd web && pnpm i ``` 4. Start the dev server of frontend diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 62aab25f..0e91bc3c 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -73,11 +73,7 @@ if (!$?) { Write-Host "Frontend built!" -f green } -Write-Host "`nGenerating buf types..." -f DarkYellow -$frontendTime = Measure-Command { - &pnpm type-gen | Out-Host -} -if (!$?) { +f (!$?) { Write-Host -BackgroundColor red -ForegroundColor white "Could not generate buf types. See above." Exit 1 } else { diff --git a/scripts/build.sh b/scripts/build.sh index 7c17ef7a..15bcad97 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -74,14 +74,6 @@ if [ $? -ne 0 ]; then fi echo -e "\033[32mFrontend dependencies installed!\033[0m" -echo -e "\n\033[33mGenerating buf types...\033[0m" -pnpm type-gen -if [ $? -ne 0 ]; then - echo -e "\033[0;31mCould not generate buf types! Exiting.\033[0m" - exit 1 -fi -echo -e "\033[32mbuf types generated!\033[0m" - echo -e "\n\033[33mBuilding frontend...\033[0m" pnpm build if [ $? -ne 0 ]; then diff --git a/scripts/start.ps1 b/scripts/start.ps1 index f03b5942..6b73c8ec 100644 --- a/scripts/start.ps1 +++ b/scripts/start.ps1 @@ -28,16 +28,6 @@ $runTasks = @( Dir = "$repoRoot/web" Wait = $true; }, - @{ - Desc = "generate buf types"; - Exe = "powershell.exe"; - Args = ( - "-Command", - "pnpm type-gen" - ); - Dir = "$repoRoot/web" - Wait = $true; - }, @{ Desc = "start backend with live reload"; Exe = "air.exe";