👽️ upgrade sveltekit
This commit is contained in:
parent
97fccf5dab
commit
167022f587
6687
package-lock.json
generated
6687
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
@ -2,11 +2,10 @@
|
||||
"name": "scuff",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "svelte-kit dev",
|
||||
"build": "svelte-kit build",
|
||||
"package": "svelte-kit package",
|
||||
"preview": "svelte-kit preview",
|
||||
"prepare": "svelte-kit sync",
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"package": "svelte-package",
|
||||
"preview": "vite preview",
|
||||
"test": "playwright test",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
@ -17,6 +16,7 @@
|
||||
"@playwright/test": "^1.21.0",
|
||||
"@sveltejs/adapter-auto": "next",
|
||||
"@sveltejs/kit": "next",
|
||||
"@sveltejs/package": "^1.0.0-next.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
||||
"@typescript-eslint/parser": "^5.10.1",
|
||||
"autoprefixer": "^10.4.5",
|
||||
@ -31,7 +31,10 @@
|
||||
"svelte-preprocess": "^4.10.1",
|
||||
"tailwindcss": "^3.0.24",
|
||||
"tslib": "^2.3.1",
|
||||
"typescript": "~4.6.2"
|
||||
"typescript": "~4.8.4"
|
||||
},
|
||||
"type": "module"
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"vite": "^3.2.3"
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="%svelte.assets%/favicon.png" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%svelte.head%
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body>
|
||||
<div>%svelte.body%</div>
|
||||
<body data-sveltekit-prefetch>
|
||||
<div>%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,5 +1,4 @@
|
||||
|
||||
const verifyCredentials = async(instance: string, token: string) => {
|
||||
const verifyCredentials = async (instance: string, token: string) => {
|
||||
const url = `${instance}/api/v1/accounts/verify_credentials`;
|
||||
|
||||
const response = await fetch(url, {
|
||||
@ -8,7 +7,7 @@ const verifyCredentials = async(instance: string, token: string) => {
|
||||
}
|
||||
});
|
||||
return await response.json();
|
||||
}
|
||||
};
|
||||
|
||||
const user = {
|
||||
verifyCredentials
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import Login from '$components/Login.svelte';
|
||||
import Login from '../components/Login.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
@ -1,5 +1,5 @@
|
||||
import { writable } from 'svelte/store'
|
||||
import type { Writable } from 'svelte/store'
|
||||
import { writable } from 'svelte/store';
|
||||
import type { Writable } from 'svelte/store';
|
||||
|
||||
export const userStore: Writable<object | null> = writable(null);
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import adapter from '@sveltejs/adapter-auto';
|
||||
import preprocess from 'svelte-preprocess';
|
||||
import path from 'path';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
@ -9,14 +8,7 @@ const config = {
|
||||
preprocess: preprocess(),
|
||||
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
vite: {
|
||||
resolve: {
|
||||
alias: {
|
||||
$components: path.resolve('./src/components')
|
||||
}
|
||||
}
|
||||
}
|
||||
adapter: adapter()
|
||||
}
|
||||
};
|
||||
|
||||
|
8
vite.config.ts
Normal file
8
vite.config.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import type { UserConfig } from 'vite';
|
||||
|
||||
const config: UserConfig = {
|
||||
plugins: [sveltekit()]
|
||||
};
|
||||
|
||||
export default config;
|
Loading…
x
Reference in New Issue
Block a user