-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use kv watch to synchronize state (#5)
- Loading branch information
Showing
8 changed files
with
470 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.env | ||
.env | ||
# Fresh build directory | ||
_fresh/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
{ | ||
"tasks": { | ||
"start": "deno run -A --unstable --watch=static/,routes/ dev.ts" | ||
"start": "deno run -A --unstable --watch=static/,routes/ dev.ts", | ||
"build": "deno run -A dev.ts build", | ||
"preview": "deno run -A main.ts" | ||
}, | ||
"importMap": "./import_map.json", | ||
"compilerOptions": { | ||
"jsx": "react-jsx", | ||
"jsxImportSource": "preact" | ||
} | ||
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, | ||
"imports": { | ||
"🛠️/": "./utils/", | ||
"🏝️/": "./islands/", | ||
"🧱/": "./components/", | ||
"$fresh/": "https://deno.land/x/[email protected]/", | ||
"preact": "https://esm.sh/[email protected]", | ||
"preact/": "https://esm.sh/[email protected]/", | ||
"preact-render-to-string": "https://esm.sh/*[email protected]", | ||
"@preact/signals": "https://esm.sh/*@preact/[email protected]", | ||
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]", | ||
"twind": "https://esm.sh/[email protected]", | ||
"twind/": "https://esm.sh/[email protected]/", | ||
"$std/": "https://deno.land/[email protected]/" | ||
}, | ||
"lint": { "rules": { "tags": ["fresh", "recommended"] } }, | ||
"exclude": ["**/_fresh/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,41 @@ | ||
// DO NOT EDIT. This file is generated by fresh. | ||
// DO NOT EDIT. This file is generated by Fresh. | ||
// This file SHOULD be checked into source version control. | ||
// This file is automatically updated during development when running `dev.ts`. | ||
|
||
import config from "./deno.json" assert { type: "json" }; | ||
import * as $0 from "./routes/_middleware.tsx"; | ||
import * as $1 from "./routes/api/events/game.ts"; | ||
import * as $2 from "./routes/api/events/games.ts"; | ||
import * as $3 from "./routes/api/place.ts"; | ||
import * as $4 from "./routes/auth/oauth2callback.ts"; | ||
import * as $5 from "./routes/auth/signin.ts"; | ||
import * as $6 from "./routes/auth/signout.ts"; | ||
import * as $7 from "./routes/game/[id].tsx"; | ||
import * as $8 from "./routes/index.tsx"; | ||
import * as $9 from "./routes/start.tsx"; | ||
import * as $$0 from "./islands/GameDisplay.tsx"; | ||
import * as $$1 from "./islands/GamesList.tsx"; | ||
import * as $_app from "./routes/_app.tsx"; | ||
import * as $_middleware from "./routes/_middleware.tsx"; | ||
import * as $api_events_game from "./routes/api/events/game.ts"; | ||
import * as $api_events_games from "./routes/api/events/games.ts"; | ||
import * as $api_place from "./routes/api/place.ts"; | ||
import * as $auth_oauth2callback from "./routes/auth/oauth2callback.ts"; | ||
import * as $auth_signin from "./routes/auth/signin.ts"; | ||
import * as $auth_signout from "./routes/auth/signout.ts"; | ||
import * as $game_id_ from "./routes/game/[id].tsx"; | ||
import * as $index from "./routes/index.tsx"; | ||
import * as $start from "./routes/start.tsx"; | ||
import * as $GameDisplay from "./islands/GameDisplay.tsx"; | ||
import * as $GamesList from "./islands/GamesList.tsx"; | ||
import { type Manifest } from "$fresh/server.ts"; | ||
|
||
const manifest = { | ||
routes: { | ||
"./routes/_middleware.tsx": $0, | ||
"./routes/api/events/game.ts": $1, | ||
"./routes/api/events/games.ts": $2, | ||
"./routes/api/place.ts": $3, | ||
"./routes/auth/oauth2callback.ts": $4, | ||
"./routes/auth/signin.ts": $5, | ||
"./routes/auth/signout.ts": $6, | ||
"./routes/game/[id].tsx": $7, | ||
"./routes/index.tsx": $8, | ||
"./routes/start.tsx": $9, | ||
"./routes/_app.tsx": $_app, | ||
"./routes/_middleware.tsx": $_middleware, | ||
"./routes/api/events/game.ts": $api_events_game, | ||
"./routes/api/events/games.ts": $api_events_games, | ||
"./routes/api/place.ts": $api_place, | ||
"./routes/auth/oauth2callback.ts": $auth_oauth2callback, | ||
"./routes/auth/signin.ts": $auth_signin, | ||
"./routes/auth/signout.ts": $auth_signout, | ||
"./routes/game/[id].tsx": $game_id_, | ||
"./routes/index.tsx": $index, | ||
"./routes/start.tsx": $start, | ||
}, | ||
islands: { | ||
"./islands/GameDisplay.tsx": $$0, | ||
"./islands/GamesList.tsx": $$1, | ||
"./islands/GameDisplay.tsx": $GameDisplay, | ||
"./islands/GamesList.tsx": $GamesList, | ||
}, | ||
baseUrl: import.meta.url, | ||
config, | ||
}; | ||
} satisfies Manifest; | ||
|
||
export default manifest; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { PageProps } from "$fresh/server.ts"; | ||
|
||
export default function App({ Component }: PageProps) { | ||
return ( | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>tic-tac-toe</title> | ||
</head> | ||
<body> | ||
<Component /> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters