Cleanup.
This commit is contained in:
parent
702469464e
commit
533eb16b98
4 changed files with 12 additions and 48 deletions
5
bun.lock
5
bun.lock
|
|
@ -4,9 +4,6 @@
|
|||
"workspaces": {
|
||||
"": {
|
||||
"name": "site",
|
||||
"dependencies": {
|
||||
"lenis": "^1.3.17",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.0.2",
|
||||
"@eslint/js": "^9.39.2",
|
||||
|
|
@ -445,8 +442,6 @@
|
|||
|
||||
"known-css-properties": ["known-css-properties@0.37.0", "", {}, "sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ=="],
|
||||
|
||||
"lenis": ["lenis@1.3.17", "", { "peerDependencies": { "@nuxt/kit": ">=3.0.0", "react": ">=17.0.0", "vue": ">=3.0.0" }, "optionalPeers": ["@nuxt/kit", "react", "vue"] }, "sha512-k9T9rgcxne49ggJOvXCraWn5dt7u2mO+BNkhyu6yxuEnm9c092kAW5Bus5SO211zUvx7aCCEtzy9UWr0RB+oJw=="],
|
||||
|
||||
"levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],
|
||||
|
||||
"lightningcss": ["lightningcss@1.31.1", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.31.1", "lightningcss-darwin-arm64": "1.31.1", "lightningcss-darwin-x64": "1.31.1", "lightningcss-freebsd-x64": "1.31.1", "lightningcss-linux-arm-gnueabihf": "1.31.1", "lightningcss-linux-arm64-gnu": "1.31.1", "lightningcss-linux-arm64-musl": "1.31.1", "lightningcss-linux-x64-gnu": "1.31.1", "lightningcss-linux-x64-musl": "1.31.1", "lightningcss-win32-arm64-msvc": "1.31.1", "lightningcss-win32-x64-msvc": "1.31.1" } }, "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ=="],
|
||||
|
|
|
|||
27
package.json
27
package.json
|
|
@ -1,18 +1,6 @@
|
|||
{
|
||||
"name": "site",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "bunx --bun vite dev",
|
||||
"build": "bunx --bun vite build",
|
||||
"preview": "bunx --bun vite preview",
|
||||
"prepare": "bunx --bun svelte-kit sync || echo ''",
|
||||
"check": "bunx --bun svelte-kit sync && bunx --bun svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "bun --bunx svelte-kit sync && bun --bunx svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "bunx --bun prettier --check . && bun --bunx eslint .",
|
||||
"format": "bunx --bun prettier --write ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.0.2",
|
||||
"@eslint/js": "^9.39.2",
|
||||
|
|
@ -40,7 +28,16 @@
|
|||
"typescript-eslint": "^8.54.0",
|
||||
"vite": "^7.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"lenis": "^1.3.17"
|
||||
}
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "bunx --bun vite dev",
|
||||
"build": "bunx --bun vite build",
|
||||
"preview": "bunx --bun vite preview",
|
||||
"prepare": "bunx --bun svelte-kit sync || echo ''",
|
||||
"check": "bunx --bun svelte-kit sync && bunx --bun svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "bun --bunx svelte-kit sync && bun --bunx svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "bunx --bun prettier --check . && bun --bunx eslint .",
|
||||
"format": "bunx --bun prettier --write ."
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
import Lenis from 'lenis';
|
||||
|
||||
let lenisInstance: Lenis;
|
||||
|
||||
export const initializeLenis = () => {
|
||||
if (!lenisInstance) {
|
||||
const lenis = new Lenis({
|
||||
anchors: true
|
||||
});
|
||||
|
||||
function raf(time: number) {
|
||||
lenis.raf(time);
|
||||
requestAnimationFrame(raf);
|
||||
}
|
||||
|
||||
requestAnimationFrame(raf);
|
||||
|
||||
lenisInstance = lenis;
|
||||
}
|
||||
|
||||
return lenisInstance;
|
||||
};
|
||||
|
|
@ -1,13 +1,7 @@
|
|||
<script lang="ts">
|
||||
import './layout.css';
|
||||
import { onMount } from 'svelte';
|
||||
import { initializeLenis } from '$lib/lenis';
|
||||
|
||||
let { children } = $props();
|
||||
|
||||
onMount(() => {
|
||||
initializeLenis();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="flex h-screen w-screen flex-col items-center gap-2 p-8">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue