Liam
Liam3mo ago

Deno equivalent for `npm create svelte@latest my-app`

Since npm create is an alias for npm init I thought I'd just be able to use deno init svelte@latest my-app as it claims to be a replacement here: https://youtu.be/d35SlRgVxT8?t=546. What would the correct way to init a svelte app? I'd like to use a deno.json if possible rather than package.json.
Deno
YouTube
Announcing Deno 2
Read more about Deno 2: https://deno.com/2 00:00 Cold open 02:37 Keynote 03:59 Demo: a program in a single file 08:31 All in one toolchain 09:05 Deno compile demo 10:39 Announcing Deno 2 11:58 Next.js demo 14:18 Node and npm compatibility 17:22 Package management 18:17 deno install demo 19:00 JSR 20:14 Deno standard library 21:18 JSR demo 27:20...
5 Replies
marvinh.
marvinh.3mo ago
The equivalent command in Deno is
deno run -A npm:create-svelte@latest
deno run -A npm:create-svelte@latest
Liam
LiamOP3mo ago
Thank you! I assumed the create things were separate from executable apps but I guess not.
marvinh.
marvinh.3mo ago
yeah even in npm it calls this package under the hood. The npm create/init command are syntactic sugar on top (which is nice!)
Liam
LiamOP3mo ago
On a side note: would you happen to know whether the deno formatter and linter would work with svelte files or should I add eslist and prettier for it
marvinh.
marvinh.3mo ago
I think support for formatting .svelte files recently landed and is part of Deno 2. Given its newness it might not be as polished as prettier. I don't think deno lint supports linting non-JS/TS files So you might be better served with eslint or oxlint

Did you find this page helpful?