Skip to content

Commit 07bacec

Browse files
committed
add well known plugin to all exercises, fix CI
1 parent e3e6e80 commit 07bacec

File tree

41 files changed

+192
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+192
-40
lines changed

epicshop/setup-custom.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,22 @@ if (!process.env.SKIP_PLAYGROUND) {
4848
)
4949
}
5050
}
51+
if (!process.env.SKIP_PRISMA) {
52+
console.log(`🏗 generating prisma client in all ${allApps.length} apps...`)
53+
for (const app of allApps) {
54+
const prismaDir = path.join(app.fullPath, 'prisma')
55+
try {
56+
if (await fsExtra.exists(prismaDir)) {
57+
if (await fsExtra.exists(path.join(prismaDir, 'sql'))) {
58+
await $({ cwd: app.fullPath, all: true })`prisma generate --sql`
59+
} else {
60+
await $({ cwd: app.fullPath, all: true })`prisma generate`
61+
}
62+
}
63+
} catch (prismaGenerateResult) {
64+
console.log(prismaGenerateResult.all)
65+
throw new Error(`❌ prisma generate failed in ${app.relativePath}`)
66+
}
67+
}
68+
console.log('✅ prisma client generated')
69+
}

exercises/01.routing/01.problem.routing/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"dotenv": "^16.3.1",
3333
"tailwindcss": "^4.1.4",
3434
"typescript": "^5.8.3",
35-
"vite": "^6.3.3"
35+
"vite": "^6.3.3",
36+
"vite-plugin-devtools-json": "^1.0.0"
3637
}
3738
}

exercises/01.routing/01.problem.routing/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4+
import devtoolsJson from 'vite-plugin-devtools-json'
45

56
export default defineConfig({
6-
plugins: [tailwindcss(), reactRouter()],
7+
plugins: [tailwindcss(), reactRouter(), devtoolsJson()],
78
server: {
89
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
910
},

exercises/01.routing/01.solution.routing/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"dotenv": "^16.3.1",
3333
"tailwindcss": "^4.1.4",
3434
"typescript": "^5.8.3",
35-
"vite": "^6.3.3"
35+
"vite": "^6.3.3",
36+
"vite-plugin-devtools-json": "^1.0.0"
3637
}
3738
}

exercises/01.routing/01.solution.routing/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4+
import devtoolsJson from 'vite-plugin-devtools-json'
45

56
export default defineConfig({
6-
plugins: [tailwindcss(), reactRouter()],
7+
plugins: [tailwindcss(), reactRouter(), devtoolsJson()],
78
server: {
89
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
910
},

exercises/01.routing/02.problem.automatic-routing/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"dotenv": "^16.3.1",
3434
"tailwindcss": "^4.1.4",
3535
"typescript": "^5.8.3",
36-
"vite": "^6.3.3"
36+
"vite": "^6.3.3",
37+
"vite-plugin-devtools-json": "^1.0.0"
3738
}
3839
}

exercises/01.routing/02.problem.automatic-routing/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4+
import devtoolsJson from 'vite-plugin-devtools-json'
45

56
export default defineConfig({
6-
plugins: [tailwindcss(), reactRouter()],
7+
plugins: [tailwindcss(), reactRouter(), devtoolsJson()],
78
server: {
89
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
910
},

exercises/01.routing/02.solution.automatic-routing/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"dotenv": "^16.3.1",
3434
"tailwindcss": "^4.1.4",
3535
"typescript": "^5.8.3",
36-
"vite": "^6.3.3"
36+
"vite": "^6.3.3",
37+
"vite-plugin-devtools-json": "^1.0.0"
3738
}
3839
}

exercises/01.routing/02.solution.automatic-routing/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4+
import devtoolsJson from 'vite-plugin-devtools-json'
45

56
export default defineConfig({
6-
plugins: [tailwindcss(), reactRouter()],
7+
plugins: [tailwindcss(), reactRouter(), devtoolsJson()],
78
server: {
89
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
910
},

exercises/02.metadata/01.problem.styling/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"react-router-devtools": "^5.1.3",
3535
"tailwindcss": "^4.1.4",
3636
"typescript": "^5.8.3",
37-
"vite": "^6.3.3"
37+
"vite": "^6.3.3",
38+
"vite-plugin-devtools-json": "^1.0.0"
3839
}
3940
}

0 commit comments

Comments
 (0)