├── demo ├── .npmrc ├── static │ ├── robots.txt │ └── favicon.png ├── src │ ├── lib │ │ └── images │ │ │ ├── svelte-welcome.png │ │ │ ├── svelte-welcome.webp │ │ │ ├── github.svg │ │ │ └── svelte-logo.svg │ ├── routes │ │ ├── +page.js │ │ ├── about │ │ │ ├── +page.js │ │ │ └── +page.svelte │ │ ├── sverdle │ │ │ ├── how-to-play │ │ │ │ ├── +page.js │ │ │ │ └── +page.svelte │ │ │ ├── reduced-motion.js │ │ │ ├── +page.server.js │ │ │ ├── game.js │ │ │ └── +page.svelte │ │ ├── +layout.svelte │ │ ├── +page.svelte │ │ ├── Counter.svelte │ │ └── Header.svelte │ ├── app.d.ts │ ├── app.html │ └── app.css ├── vite.config.js ├── .gitignore ├── svelte.config.js ├── jsconfig.json ├── package.json └── README.md ├── files ├── server.js └── mod.ts ├── .gitignore ├── index.d.ts ├── .github └── workflows │ └── ci.yml ├── package.json ├── LICENSE ├── index.js └── README.md /demo/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /demo/static/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /demo/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbushell/sveltekit-adapter-deno/HEAD/demo/static/favicon.png -------------------------------------------------------------------------------- /demo/src/lib/images/svelte-welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbushell/sveltekit-adapter-deno/HEAD/demo/src/lib/images/svelte-welcome.png -------------------------------------------------------------------------------- /demo/src/lib/images/svelte-welcome.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbushell/sveltekit-adapter-deno/HEAD/demo/src/lib/images/svelte-welcome.webp -------------------------------------------------------------------------------- /demo/src/routes/+page.js: -------------------------------------------------------------------------------- 1 | // since there's no dynamic data here, we can prerender 2 | // it so that it gets served as a static asset in production 3 | export const prerender = true; 4 | -------------------------------------------------------------------------------- /demo/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from "@sveltejs/kit/vite"; 2 | import { defineConfig } from "vite"; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()], 6 | }); 7 | -------------------------------------------------------------------------------- /files/server.js: -------------------------------------------------------------------------------- 1 | import { Server } from "./server/index.js"; 2 | import { manifest } from "./server/manifest.js"; 3 | 4 | const server = new Server(manifest); 5 | 6 | export default server; 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /* 2 | !.github 3 | !.gitignore 4 | !index.d.ts 5 | !index.js 6 | !package.json 7 | !README.md 8 | !LICENSE 9 | !files 10 | files/* 11 | !files/*.json 12 | !files/*.js 13 | !files/*.ts 14 | !demo 15 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | # Output 4 | .output 5 | .vercel 6 | /.svelte-kit 7 | /build 8 | 9 | # OS 10 | .DS_Store 11 | Thumbs.db 12 | 13 | # Env 14 | .env 15 | .env.* 16 | !.env.example 17 | !.env.test 18 | 19 | # Vite 20 | vite.config.js.timestamp-* 21 | vite.config.ts.timestamp-* 22 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | import { Adapter } from "@sveltejs/kit"; 2 | import { BuildOptions } from "esbuild"; 3 | 4 | interface AdapterOptions { 5 | out?: string; 6 | buildOptions?: BuildOptions; 7 | usage?: "deno" | "deno-compile"; 8 | } 9 | 10 | export default function plugin(options?: AdapterOptions): Adapter; 11 | -------------------------------------------------------------------------------- /demo/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://svelte.dev/docs/kit/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface PageState {} 9 | // interface Platform {} 10 | } 11 | } 12 | 13 | export {}; 14 | -------------------------------------------------------------------------------- /demo/src/routes/about/+page.js: -------------------------------------------------------------------------------- 1 | import { dev } from "$app/environment"; 2 | 3 | // we don't need any JS on this page, though we'll load 4 | // it in dev so that we get hot module replacement 5 | export const csr = dev; 6 | 7 | // since there's no dynamic data here, we can prerender 8 | // it so that it gets served as a static asset in production 9 | export const prerender = true; 10 | -------------------------------------------------------------------------------- /demo/src/routes/sverdle/how-to-play/+page.js: -------------------------------------------------------------------------------- 1 | import { dev } from "$app/environment"; 2 | 3 | // we don't need any JS on this page, though we'll load 4 | // it in dev so that we get hot module replacement 5 | export const csr = dev; 6 | 7 | // since there's no dynamic data here, we can prerender 8 | // it so that it gets served as a static asset in production 9 | export const prerender = true; 10 | -------------------------------------------------------------------------------- /demo/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |10 | This is a SvelteKit app. You can make your own by typing 11 | the following into your command line and following the prompts: 12 |
13 | 14 |npx sv create15 | 16 |
17 | The page you're looking at is purely static HTML, with no client-side interactivity needed. 18 | Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening 19 | the devtools network panel and reloading. 20 |
21 | 22 |23 | The Sverdle page illustrates SvelteKit's data loading and form handling. Try 24 | using it with JavaScript disabled! 25 |
26 |10 | Sverdle is a clone of Wordle, the 11 | word guessing game. To play, enter a five-letter English word. For example: 12 |
13 | 14 |23 | The y is in the right place. r and 24 | t 25 | are the right letters, but in the wrong place. The other letters are wrong, and can be discarded. 26 | Let's make another guess: 27 |
28 | 29 |This time we guessed right! You have six guesses to get the word.
38 | 39 |
40 | Unlike the original Wordle, Sverdle runs on the server instead of in the browser, making it
41 | impossible to cheat. It uses <form> and cookies to submit data, meaning you can
42 | even play with JavaScript disabled!
43 |