-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try creating a SvelteKit project using Deno 2 #87
Comments
I created a project using the command below. deno run -A npm:sv create my-app I removed I formatted all files using the command below. deno fmt --unstable I converted the {
"$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
"version": "0.0.1",
"tasks": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"imports": {
"@std/assert": "jsr:@std/assert@1",
"@sveltejs/adapter-auto": "npm:@sveltejs/adapter-auto@^3.3.1",
"@sveltejs/kit": "npm:@sveltejs/kit@^2.13.0",
"@sveltejs/vite-plugin-svelte": "npm:@sveltejs/vite-plugin-svelte@^5.0.3",
"svelte": "npm:svelte@^5.14.5",
"svelte-check": "npm:svelte-check@^4.1.1",
"typescript": "npm:typescript@^5.7.2",
"vite": "npm:vite@^6.0.4"
},
"nodeModulesDir": "auto"
}
Adding Node.js/npm dependencies with deno add -D --allow-scripts npm:@sveltejs/adapter-auto npm:@sveltejs/kit npm:@sveltejs/vite-plugin-svelte npm:svelte npm:svelte-check npm:typescript npm:vite adds them to I had to leave this {
"type": "module"
} Leaving out Following the link and changing I removed I rewrote I added type-checking for a browser environment according to these instructions: https://docs.deno.com/runtime/reference/ts_config_migration/#targeting-deno-and-the-browser. I also added type-checking for JavaScript files since the project contains a I added tasks for deno check, deno fmt and deno lint. I modified |
I wish sveltekit on deno get easier soon, this is madness! Although thanks for sharing. 😘 |
Thanks! I uploaded a template with all the changes I made here: https://github.com/AndreasNasman/deno-sveltekit-template. I must still document the process and gothas in the project's README. And yes, let's hope it gets more straightforward in the future 😅 |
Resources
The text was updated successfully, but these errors were encountered: