chore(setup): migrate from SvelteKit to Svelte

This commit is contained in:
Ilia Mashkov
2025-12-30 18:57:58 +03:00
parent def01a2cad
commit f3315be32d
16 changed files with 79 additions and 187 deletions

17
src/App.svelte Normal file
View File

@@ -0,0 +1,17 @@
<script lang="ts">
import './app.css';
import Page from './routes/Page.svelte';
</script>
<svelte:head> </svelte:head>
<div id="app-root">
<Page />
</div>
<style>
#app-root {
width: 100%;
height: 100vh;
}
</style>

13
src/app.d.ts vendored
View File

@@ -1,13 +0,0 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};

View File

@@ -1,11 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

6
src/main.ts Normal file
View File

@@ -0,0 +1,6 @@
import { mount } from 'svelte';
import App from './App.svelte';
mount(App, {
target: document.getElementById('app')!,
});

View File

@@ -1,11 +0,0 @@
<script lang="ts">
import favicon from '$lib/assets/favicon.svg';
import '../app.css';
let { children } = $props();
</script>
<svelte:head>
<link rel="icon" href={favicon} />
</svelte:head>
{@render children()}

View File

@@ -1,9 +0,0 @@
<script>
import Button from '$lib/components/ui/button/button.svelte';
</script>
<h1>Welcome to SvelteKit</h1>
<p>
Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation
</p>
<Button>Click me!</Button>

9
src/routes/Page.svelte Normal file
View File

@@ -0,0 +1,9 @@
<script>
import Button from '$lib/components/ui/button/button.svelte';
</script>
<h1>Welcome to Svelte + Vite</h1>
<p>
Visit <a href="https://svelte.dev/docs">svelte.dev/docs</a> to read the documentation
</p>
<Button>Click me!</Button>