Skip to content

Commit

Permalink
chore(frontend): add Just-in-Time package builds (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov authored Feb 10, 2025
1 parent 72cb9c3 commit 006212b
Show file tree
Hide file tree
Showing 64 changed files with 993 additions and 272 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
# Apps
- subdir: apps/battleship
build: build
- subdir: apps/battleship-zk
build: build
- subdir: apps/galactic-express
build: build
- subdir: apps/nft-marketplace
Expand All @@ -54,11 +56,13 @@ jobs:
build: build
- subdir: apps/varatube
build: build
- subdir: apps/w3bstreaming
build: build
- subdir: apps/web3-warriors-battle
build: build

# Packages
- subdir: packages/error-tracking
build: build
- subdir: packages/ui
- subdir: packages/ez-transactions
build: build

runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/battleship-zk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "1.0.2",
"type": "module",
"scripts": {
"start": "yarn build:packages && yarn build:ez-transactions && npx vite",
"build": "yarn build:packages && yarn build:ez-transactions && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/battleship-zk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/battleship/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "1.0.2",
"type": "module",
"scripts": {
"start": "yarn build:packages && yarn build:ez-transactions && npx vite",
"build": "yarn build:packages && yarn build:ez-transactions && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/battleship/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/galactic-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/galactic-express/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/nft-marketplace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/nft-marketplace/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/nft-master/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/nft-master/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/non-fungible-token/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/non-fungible-token/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/racing-car-game/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && yarn build:ez-transactions && npx vite",
"build": "yarn build:packages && yarn build:ez-transactions && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/racing-car-game/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/syndote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/syndote/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/tamagotchi-battle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && yarn build:ez-transactions && npx vite",
"build": "yarn build:packages && yarn build:ez-transactions && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/tamagotchi-battle/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/tamagotchi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "1.0.2",
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/tamagotchi/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/tequila-train/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "1.0.2",
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
14 changes: 13 additions & 1 deletion frontend/apps/tequila-train/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"extends": "../../tsconfig.json",

// each package has its own @ alias, cuz vite doesn't support single alias for multiple paths
// sources:
// https://github.com/vercel/turborepo/discussions/620
// https://github.com/vitejs/vite/issues/5370

// TODO: replace with configDir in the root config,
// once https://github.com/import-js/eslint-import-resolver-typescript/issues/299 is resolved
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
"paths": {
"@/*": ["./src/*"],
"@ui/*": ["../../packages/ui/src/*"],
"@ez/*": ["../../packages/ez-transactions/src/*"],
"gear-ez-transactions": ["../../packages/ez-transactions/src/index.ts"]
}
},

"include": ["src"]
Expand Down
4 changes: 2 additions & 2 deletions frontend/apps/tic-tac-toe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "1.0.2",
"type": "module",
"scripts": {
"start": "yarn build:packages && yarn build:ez-transactions && npx vite",
"build": "yarn build:packages && yarn build:ez-transactions && npx vite build",
"start": "npx vite",
"build": "npx vite build",
"preview": "npx vite preview"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 006212b

Please sign in to comment.