mirror of
https://github.com/LukeHagar/LukeHagar.com.git
synced 2025-12-06 04:20:17 +00:00
migration to Svelte 5
This commit is contained in:
16
package.json
16
package.json
@@ -16,8 +16,8 @@
|
|||||||
"@skeletonlabs/skeleton": "^2.7.0",
|
"@skeletonlabs/skeleton": "^2.7.0",
|
||||||
"@skeletonlabs/tw-plugin": "^0.3.1",
|
"@skeletonlabs/tw-plugin": "^0.3.1",
|
||||||
"@sveltejs/adapter-node": "^5.2.0",
|
"@sveltejs/adapter-node": "^5.2.0",
|
||||||
"@sveltejs/kit": "^2.0.0",
|
"@sveltejs/kit": "^2.5.27",
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||||
"@tailwindcss/forms": "^0.5.3",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@tsparticles/svelte": "^3.0.0",
|
"@tsparticles/svelte": "^3.0.0",
|
||||||
@@ -31,15 +31,15 @@
|
|||||||
"eslint-plugin-svelte3": "^4.0.0",
|
"eslint-plugin-svelte3": "^4.0.0",
|
||||||
"postcss": "^8.4.24",
|
"postcss": "^8.4.24",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.1.1",
|
||||||
"prettier-plugin-svelte": "^3.1.2",
|
"prettier-plugin-svelte": "^3.2.6",
|
||||||
"svelte": "^4.0.0",
|
"svelte": "^5.0.0",
|
||||||
"svelte-check": "^3.4.3",
|
"svelte-check": "^4.0.0",
|
||||||
"svelte-preprocess": "^5.1.3",
|
"svelte-preprocess": "^6.0.0",
|
||||||
"tailwindcss": "^3.4.0",
|
"tailwindcss": "^3.4.0",
|
||||||
"tslib": "^2.5.2",
|
"tslib": "^2.5.2",
|
||||||
"tsparticles": "3.1.0",
|
"tsparticles": "3.1.0",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.5.0",
|
||||||
"vite": "^5.0.0"
|
"vite": "^5.4.4"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<!-- @migration-task Error while migrating Svelte code: $$props is used together with named props in a way that cannot be automatically migrated. -->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,13 @@
|
|||||||
|
|
||||||
import { particlesInit } from '@tsparticles/svelte';
|
import { particlesInit } from '@tsparticles/svelte';
|
||||||
import { loadFull } from 'tsparticles';
|
import { loadFull } from 'tsparticles';
|
||||||
|
interface Props {
|
||||||
|
children?: import('svelte').Snippet;
|
||||||
|
}
|
||||||
|
|
||||||
let ParticlesComponent;
|
let { children }: Props = $props();
|
||||||
|
|
||||||
|
let ParticlesComponent = $state();
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
const module = await import('@tsparticles/svelte');
|
const module = await import('@tsparticles/svelte');
|
||||||
@@ -43,6 +48,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:component this={ParticlesComponent} id="tsparticles" options={particlesConfig} />
|
<ParticlesComponent id="tsparticles" options={particlesConfig} />
|
||||||
<!-- Page Route Content -->
|
<!-- Page Route Content -->
|
||||||
<slot />
|
{@render children?.()}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<p>Hi, I'm Luke</p>
|
<p>Hi, I'm Luke</p>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="flex justify-center space-x-2" />
|
<div class="flex justify-center space-x-2"></div>
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
<Avatar src="/Luke.png" width="w-48" class="mx-auto" />
|
<Avatar src="/Luke.png" width="w-48" class="mx-auto" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user