test(fixtures): add vite-kitchen fixture repo

Minimal Vite + React + TS + Tailwind app with a typed-props Button
component (the future react-docgen-typescript scan target), landed at
fixtures/ outside the pnpm workspace and turbo graph. Its dependencies
exist on paper only — the runner installs them after cloning (story 04);
no lockfile, never pnpm-installed here.

Ignore surfaces follow the docs/product/reference precedent: fallow,
root ESLint, prettier, and the coverage:diff ALLOWED_GLOBS all skip
fixtures/**.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-12 21:36:21 +02:00
parent fe9b2c4151
commit 1ae4a2385c
14 changed files with 164 additions and 1 deletions

3
fixtures/vite-kitchen/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules
dist
*.local

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>vite-kitchen</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

View File

@@ -0,0 +1,24 @@
{
"name": "vite-kitchen",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.7",
"@types/react": "^19.1.0",
"@types/react-dom": "^19.1.0",
"@vitejs/plugin-react": "^4.4.1",
"tailwindcss": "^4.1.7",
"typescript": "~5.8.3",
"vite": "^6.3.5"
}
}

View File

@@ -0,0 +1,12 @@
import { Button } from "./components/Button";
export function App() {
return (
<main className="flex min-h-screen flex-col items-center justify-center gap-4 bg-slate-50">
<h1 className="text-2xl font-semibold text-slate-900">vite-kitchen</h1>
<Button variant="primary" size="md">
Order up
</Button>
</main>
);
}

View File

@@ -0,0 +1,45 @@
import type { ReactNode } from "react";
export interface ButtonProps {
/** Visual emphasis of the button. */
variant?: "primary" | "secondary" | "ghost";
/** Control scale — padding and font size. */
size?: "sm" | "md" | "lg";
/** Disables interaction and dims the control. */
disabled?: boolean;
/** Button label content. */
children: ReactNode;
}
const variantClasses: Record<NonNullable<ButtonProps["variant"]>, string> = {
primary: "bg-blue-600 text-white hover:bg-blue-700",
secondary: "bg-slate-200 text-slate-900 hover:bg-slate-300",
ghost: "bg-transparent text-blue-600 hover:bg-blue-50",
};
const sizeClasses: Record<NonNullable<ButtonProps["size"]>, string> = {
sm: "px-2.5 py-1.5 text-sm",
md: "px-4 py-2 text-base",
lg: "px-6 py-3 text-lg",
};
/**
* The kitchen's one interactive component. Its name and typed props are the
* target of the registry scan (react-docgen-typescript) in later stories.
*/
export function Button({
variant = "primary",
size = "md",
disabled = false,
children,
}: ButtonProps) {
return (
<button
type="button"
className={`rounded-md font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${variantClasses[variant]} ${sizeClasses[size]}`}
disabled={disabled}
>
{children}
</button>
);
}

View File

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

View File

@@ -0,0 +1,15 @@
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./App";
import "./index.css";
const rootElement = document.getElementById("root");
if (!rootElement) {
throw new Error("vite-kitchen: #root element not found");
}
createRoot(rootElement).render(
<StrictMode>
<App />
</StrictMode>,
);

View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"strict": true,
"noEmit": true,
"isolatedModules": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true
},
"include": ["src", "vite.config.ts"]
}

View File

@@ -0,0 +1,8 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
});