Skip to content

Commit 4fdcc3f

Browse files
author
Vic Shóstak
authored
Merge pull request #181 from tkhs0813/main
Support Sveltekit
2 parents 7326786 + 514763d commit 4fdcc3f

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,11 @@ Solid, Lit, Qwik, or pure JavaScript/TypeScript templates for your project.
158158
The `Next.js` and `Nuxt` frontend parts will be generated using the latest
159159
`create-next-app` and `nuxi` utilities.
160160

161-
| Name | Description | JavaScript | Typescript |
162-
| --------------------- | -------------------- | ---------- | ---------- |
163-
| [Next.js][nextjs_url] | A common Next.js app | `next` | `next-ts` |
164-
| [Nuxt][nuxt_url] | A common Nuxt v3 app | - | `nuxt` |
161+
| Name | Description | JavaScript | Typescript |
162+
| -------------------------- | ---------------------- | ---------- | ----------- |
163+
| [Next.js][nextjs_url] | A common Next.js app | `next` | `next-ts` |
164+
| [Nuxt][nuxt_url] | A common Nuxt v3 app | - | `nuxt` |
165+
| [Sveltekit][sveltekit_url] | A common Sveltekit app | - | `sveltekit` |
165166

166167
> ❗️ Please make sure that you have `npm` version `7` or higher installed to
167168
> create the frontend part of the project correctly. If you run the
@@ -293,6 +294,7 @@ created by [Vic Shóstak][author] and distributed under
293294
[preact_url]: https://preactjs.com/
294295
[nextjs_url]: https://nextjs.org/
295296
[nuxt_url]: https://v3.nuxtjs.org/
297+
[sveltekit_url]: https://kit.svelte.dev/
296298
[svelte_url]: https://svelte.dev/
297299
[lit_url]: https://lit.dev/
298300
[chi_url]: https://github.com/go-chi/chi

cmd/create.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,18 @@ func runCreateCmd(cmd *cobra.Command, args []string) error {
164164
); err != nil {
165165
return err
166166
}
167+
case "sveltekit":
168+
// Create a default frontend template with Sveltekit (Svelte, Typescript).
169+
if err := cgapp.ExecCommand(
170+
"npm",
171+
[]string{
172+
"create", "@svelte-add/kit@latest", "frontend",
173+
"--",
174+
"--with", "typescript+eslint+prettier",
175+
}, true,
176+
); err != nil {
177+
return err
178+
}
167179
default:
168180
// Create a default frontend template from Vite (Pure JS/TS, React, Preact, Vue, Svelte, Lit).
169181
if err := cgapp.ExecCommand(

pkg/registry/defaults.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ var (
7575
"nuxt",
7676
"vue",
7777
"vue-ts",
78+
"sveltekit",
7879
"svelte",
7980
"svelte-ts",
8081
"solid",

0 commit comments

Comments
 (0)