Skip to content

nicosql/1adeno-sveltekit

This branch is 1 commit behind cotyhamilton/deno-sveltekit:main.

Folders and files

NameName
Last commit message
Last commit date
Oct 24, 2024
Oct 24, 2024
Aug 31, 2024
Aug 31, 2024
Aug 31, 2024
Oct 24, 2024
Oct 24, 2024
Oct 24, 2024
Oct 24, 2024
Oct 24, 2024
Aug 31, 2024

Repository files navigation

deno sveltekit

create project

deno run -A npm:sv@latest create my-app
cd my-app
deno add npm:@types/deno

replace adapter

⚠️ Soon this won't be needed, follow this issue for updates

I like sveltekit-adapter-deno

The rest of the instructions are tailored to using this adapter, adjust as needed if you choose differently.

deno remove @sveltejs/adapter-auto
deno add npm:sveltekit-adapter-deno

Update svelte.config.js

- import adapter from '@sveltejs/adapter-auto';
+ import adapter from 'sveltekit-adapter-deno';

develop

Install dependencies

deno install

Run the dev server

deno task dev

build

deno task build

Run production server

deno run -REN build/mod.ts

deploy

Create project on deno deploy and link repo

Svelte will be automatically selected as the framework preset

Open advanced settings

  • Set "Install Step" to deno install
  • Set "Build Step" to deno task build
  • Set "Root directory" to build
  • Set "Entrypoint" to mod.ts

Alternatively, deploy from the command line:

deno task build
cd build
deployctl deploy --project=<project-name> --entrypoint=mod.ts

live example

https://deno-sveltekit-example.deno.dev

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.5%
  • Svelte 11.7%
  • CSS 1.2%
  • Other 0.6%