Skip to content

Commit

Permalink
chore: remove type-gen script
Browse files Browse the repository at this point in the history
  • Loading branch information
boojack committed Feb 5, 2024
1 parent e35225f commit ba46038
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 29 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 0 additions & 8 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions scripts/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit ba46038

Please sign in to comment.