Skip to content

Commit b250326

Browse files
committed
upgrade sveltekit template
1 parent b1854ad commit b250326

39 files changed

+14766
-1390
lines changed

.eslintignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ node_modules
88
!.env.example
99
.vercel
1010
.output
11+
vite.config.js.timestamp-*
12+
vite.config.ts.timestamp-*

.prettierignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

.prettierrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
"useTabs": true,
33
"singleQuote": true,
44
"trailingComma": "none",
5-
"printWidth": 100
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte"],
7+
"pluginSearchDirs": ["."],
8+
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
69
}

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ This example is a simple [SvelteKit](https://kit.svelte.dev/) app.
2525

2626
## 📝 Notes
2727

28-
This example was created by running `npm init svelte@next`. SvelteKit is beta
29-
software and may have bugs. Please see the [official
28+
This example was created by running `yarn create svelte`. Please see the [official
3029
documentation](https://kit.svelte.dev/docs) for more info.

package.json

+26-32
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,33 @@
22
"name": "svelte-kit",
33
"version": "0.0.1",
44
"scripts": {
5-
"dev": "svelte-kit dev",
6-
"build": "svelte-kit build",
7-
"start": "node build/index.js",
8-
"package": "svelte-kit package",
9-
"preview": "svelte-kit preview",
10-
"prepare": "svelte-kit sync",
11-
"check": "svelte-check --tsconfig ./tsconfig.json",
12-
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
13-
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
14-
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
5+
"dev": "vite dev",
6+
"build": "vite build",
7+
"preview": "vite preview",
8+
"start": "node build",
9+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
11+
"lint": "prettier --plugin-search-dir . --check . && eslint .",
12+
"format": "prettier --plugin-search-dir . --write ."
1513
},
1614
"devDependencies": {
17-
"@sveltejs/adapter-auto": "next",
18-
"@sveltejs/adapter-node": "^1.0.0-next.72",
19-
"@sveltejs/kit": "next",
20-
"@types/cookie": "^0.4.1",
21-
"@typescript-eslint/eslint-plugin": "^5.10.1",
22-
"@typescript-eslint/parser": "^5.10.1",
23-
"eslint": "^7.32.0",
24-
"eslint-config-prettier": "^8.3.0",
25-
"eslint-plugin-svelte3": "^3.2.1",
26-
"prettier": "^2.5.1",
27-
"prettier-plugin-svelte": "^2.5.0",
28-
"svelte": "^3.46.0",
29-
"svelte-check": "^2.2.6",
30-
"svelte-preprocess": "^4.10.1",
31-
"tslib": "^2.3.1",
32-
"typescript": "~4.6.2"
15+
"@fontsource/fira-mono": "^4.5.10",
16+
"@neoconfetti/svelte": "^1.0.0",
17+
"@sveltejs/adapter-node": "^1.0.0",
18+
"@sveltejs/kit": "^1.0.0",
19+
"@types/cookie": "^0.5.1",
20+
"@typescript-eslint/eslint-plugin": "^5.45.0",
21+
"@typescript-eslint/parser": "^5.45.0",
22+
"eslint": "^8.28.0",
23+
"eslint-config-prettier": "^8.5.0",
24+
"eslint-plugin-svelte3": "^4.0.0",
25+
"prettier": "^2.8.0",
26+
"prettier-plugin-svelte": "^2.8.1",
27+
"svelte": "^3.54.0",
28+
"svelte-check": "^3.0.1",
29+
"tslib": "^2.4.1",
30+
"typescript": "^4.9.3",
31+
"vite": "^4.0.0"
3332
},
34-
"type": "module",
35-
"dependencies": {
36-
"@fontsource/fira-mono": "^4.5.0",
37-
"@lukeed/uuid": "^2.0.0",
38-
"cookie": "^0.4.1"
39-
}
33+
"type": "module"
4034
}

src/app.css

-107
This file was deleted.

src/app.d.ts

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
/// <reference types="@sveltejs/kit" />
2-
3-
// See https://kit.svelte.dev/docs/types#the-app-namespace
1+
// See https://kit.svelte.dev/docs/types#app
42
// for information about these interfaces
5-
declare namespace App {
6-
interface Locals {
7-
userid: string;
3+
declare global {
4+
namespace App {
5+
// interface Error {}
6+
// interface Locals {}
7+
// interface PageData {}
8+
// interface Platform {}
89
}
9-
10-
// interface Platform {}
11-
12-
// interface Session {}
13-
14-
// interface Stuff {}
1510
}
11+
12+
export {};

src/app.html

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<meta name="description" content="Svelte demo app" />
6-
<link rel="icon" href="%svelte.assets%/favicon.png" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1" />
8-
%svelte.head%
5+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6+
<meta name="viewport" content="width=device-width" />
7+
%sveltekit.head%
98
</head>
10-
<body>
11-
<div>%svelte.body%</div>
9+
<body data-sveltekit-preload-data="hover">
10+
<div style="display: contents">%sveltekit.body%</div>
1211
</body>
1312
</html>

src/hooks.ts

-24
This file was deleted.

src/lib/form.ts

-84
This file was deleted.

src/lib/images/github.svg

+16
Loading
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)