feat: add dev server
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6e22ec9d76
commit
23472bae66
33
src/dev/index.html
Normal file
33
src/dev/index.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html data-theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tiny Sprites</title>
|
||||
<link rel="stylesheet" href="/public/pico.min.css">
|
||||
<style>
|
||||
.preview-area {
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-image:
|
||||
linear-gradient(45deg, #3a3a3a 25%, transparent 25%),
|
||||
linear-gradient(-45deg, #3a3a3a 25%, transparent 25%),
|
||||
linear-gradient(45deg, transparent 75%, #3a3a3a 75%),
|
||||
linear-gradient(-45deg, transparent 75%, #3a3a3a 75%);
|
||||
background-size: 16px 16px;
|
||||
background-position: 0 0, 0 8px, 8px -8px, -8px 0;
|
||||
border-radius: var(--pico-border-radius);
|
||||
}
|
||||
.preview-area > div { image-rendering: pixelated; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
<h1>Tiny Sprites</h1>
|
||||
<div id="app"></div>
|
||||
</main>
|
||||
<script type="module" src="./app.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
14
src/dev/server.tsx
Normal file
14
src/dev/server.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bun
|
||||
import { Hono } from "hono"
|
||||
import { serveStatic } from "hono/bun"
|
||||
import index from "./index.html"
|
||||
|
||||
const app = new Hono()
|
||||
|
||||
app.use("/public/*", serveStatic({ root: "./" }))
|
||||
app.get("/", (c) => c.html(index))
|
||||
|
||||
export default {
|
||||
port: 3000,
|
||||
fetch: app.fetch,
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user