feat(chess): scaffold Vite + React app (P3.9)

This commit is contained in:
Joey Yakimowich-Payne 2026-04-16 15:54:32 -06:00
commit 0f891fa013
No known key found for this signature in database
6 changed files with 90 additions and 1 deletions

12
packages/chess/index.html Normal file
View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chess App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/app/main.tsx"></script>
</body>
</html>

View file

@ -8,7 +8,10 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@paratype/rete": "workspace:*"
"@paratype/rete": "workspace:*",
"@tailwindcss/vite": "^4.2.2",
"react-router-dom": "^7.14.1",
"tailwindcss": "^4.2.2"
},
"devDependencies": {
"vite": "^6.0.0",

View file

@ -0,0 +1,46 @@
import { Routes, Route } from 'react-router-dom'
export function App() {
return (
<div data-testid="app-root">
<Routes>
<Route path="/" element={<Home />} />
<Route path="/game" element={<Game />} />
<Route path="/rules" element={<Rules />} />
<Route path="/save" element={<Save />} />
</Routes>
</div>
)
}
function Home() {
return (
<main data-testid="page-home">
<h1>Home</h1>
</main>
)
}
function Game() {
return (
<main data-testid="page-game">
<h1>Game</h1>
</main>
)
}
function Rules() {
return (
<main data-testid="page-rules">
<h1>Rules</h1>
</main>
)
}
function Save() {
return (
<main data-testid="page-save">
<h1>Save</h1>
</main>
)
}

View file

@ -0,0 +1 @@
@import "tailwindcss";

View file

@ -0,0 +1,17 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { BrowserRouter } from 'react-router-dom'
import './index.css'
import { App } from './App'
const container = document.getElementById('root')
if (!container) throw new Error('Failed to find the root element')
const root = createRoot(container)
root.render(
<StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</StrictMode>
)

View file

@ -0,0 +1,10 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [
tailwindcss(),
react()
],
})