Skip to content

Commit 10f292c

Browse files
committed
finish up metadata module, remove uneeded stuff
1 parent 87bdb68 commit 10f292c

File tree

41 files changed

+473
-224
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

+473
-224
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "exercises_01.routing_01.problem.routing",
33
"private": true,
44
"type": "module",
5+
"imports": {
6+
"#app/*": "./app/*"
7+
},
58
"scripts": {
69
"build": "react-router build",
710
"dev": "react-router dev",
@@ -29,7 +32,6 @@
2932
"dotenv": "^16.3.1",
3033
"tailwindcss": "^4.1.4",
3134
"typescript": "^5.8.3",
32-
"vite": "^6.3.3",
33-
"vite-tsconfig-paths": "^5.1.4"
35+
"vite": "^6.3.3"
3436
}
3537
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4-
import tsconfigPaths from 'vite-tsconfig-paths'
54

65
export default defineConfig({
7-
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
6+
plugins: [tailwindcss(), reactRouter()],
87
server: {
98
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
109
},

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "exercises_01.routing_01.solution.routing",
33
"private": true,
44
"type": "module",
5+
"imports": {
6+
"#app/*": "./app/*"
7+
},
58
"scripts": {
69
"build": "react-router build",
710
"dev": "react-router dev",
@@ -29,7 +32,6 @@
2932
"dotenv": "^16.3.1",
3033
"tailwindcss": "^4.1.4",
3134
"typescript": "^5.8.3",
32-
"vite": "^6.3.3",
33-
"vite-tsconfig-paths": "^5.1.4"
35+
"vite": "^6.3.3"
3436
}
3537
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4-
import tsconfigPaths from 'vite-tsconfig-paths'
54

65
export default defineConfig({
7-
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
6+
plugins: [tailwindcss(), reactRouter()],
87
server: {
98
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
109
},

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "exercises_01.routing_02.problem.automatic-routing",
33
"private": true,
44
"type": "module",
5+
"imports": {
6+
"#app/*": "./app/*"
7+
},
58
"scripts": {
69
"build": "react-router build",
710
"dev": "react-router dev",
@@ -29,7 +32,6 @@
2932
"dotenv": "^16.3.1",
3033
"tailwindcss": "^4.1.4",
3134
"typescript": "^5.8.3",
32-
"vite": "^6.3.3",
33-
"vite-tsconfig-paths": "^5.1.4"
35+
"vite": "^6.3.3"
3436
}
3537
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4-
import tsconfigPaths from 'vite-tsconfig-paths'
54

65
export default defineConfig({
7-
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
6+
plugins: [tailwindcss(), reactRouter()],
87
server: {
98
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
109
},

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "exercises_01.routing_02.solution.automatic-routing",
33
"private": true,
44
"type": "module",
5+
"imports": {
6+
"#app/*": "./app/*"
7+
},
58
"scripts": {
69
"build": "react-router build",
710
"dev": "react-router dev",
@@ -30,7 +33,6 @@
3033
"dotenv": "^16.3.1",
3134
"tailwindcss": "^4.1.4",
3235
"typescript": "^5.8.3",
33-
"vite": "^6.3.3",
34-
"vite-tsconfig-paths": "^5.1.4"
36+
"vite": "^6.3.3"
3537
}
3638
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { reactRouter } from '@react-router/dev/vite'
22
import tailwindcss from '@tailwindcss/vite'
33
import { defineConfig } from 'vite'
4-
import tsconfigPaths from 'vite-tsconfig-paths'
54

65
export default defineConfig({
7-
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
6+
plugins: [tailwindcss(), reactRouter()],
87
server: {
98
port: process.env.PORT ? parseInt(process.env.PORT) : 3000,
109
},

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "exercises_02.metadata_01.problem.styling",
33
"private": true,
44
"type": "module",
5+
"imports": {
6+
"#app/*": "./app/*"
7+
},
58
"scripts": {
69
"build": "react-router build",
710
"dev": "react-router dev",
@@ -31,7 +34,6 @@
3134
"react-router-devtools": "^5.1.3",
3235
"tailwindcss": "^4.1.4",
3336
"typescript": "^5.8.3",
34-
"vite": "^6.3.3",
35-
"vite-tsconfig-paths": "^5.1.4"
37+
"vite": "^6.3.3"
3638
}
3739
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import test, { expect } from '@playwright/test'
2+
3+
test.describe('Routing E2E Tests', () => {
4+
test('should navigate to home page and render correct content', async ({
5+
page,
6+
}) => {
7+
await page.goto('/')
8+
const stylesheets = await page.locator('link[rel="stylesheet"]').all()
9+
expect(stylesheets.length).toBeGreaterThan(0)
10+
const stylesheetValues = await Promise.all(stylesheets.map(async (link) => {
11+
const href = await link.getAttribute('href')
12+
return href
13+
}))
14+
const requiredStylesheets = [
15+
"/app/app.css",
16+
"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
17+
]
18+
requiredStylesheets.forEach((requiredStylesheet) => {
19+
expect(stylesheetValues).toContain(requiredStylesheet)
20+
})
21+
})
22+
23+
})

0 commit comments

Comments
 (0)