mirror of
https://github.com/apricote/ein-pfeil-am-rechten-fleck.de.git
synced 2026-01-13 13:01:02 +00:00
chore(deps): re-init with latest svelte-kit
This commit is contained in:
parent
45e37e2038
commit
db8d8e47ee
24 changed files with 553 additions and 1499 deletions
13
.eslintignore
Normal file
13
.eslintignore
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/build
|
||||||
|
/.svelte-kit
|
||||||
|
/package
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Ignore files for PNPM, NPM and YARN
|
||||||
|
pnpm-lock.yaml
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
parser: "@typescript-eslint/parser",
|
parser: "@typescript-eslint/parser",
|
||||||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
],
|
||||||
plugins: ["svelte3", "@typescript-eslint"],
|
plugins: ["svelte3", "@typescript-eslint"],
|
||||||
ignorePatterns: ["*.cjs"],
|
ignorePatterns: ["*.cjs"],
|
||||||
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
|
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
|
||||||
|
|
@ -10,7 +14,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
sourceType: "module",
|
sourceType: "module",
|
||||||
ecmaVersion: 2019,
|
ecmaVersion: 2020,
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
|
|
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -1,6 +1,10 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
/.svelte-kit
|
|
||||||
/build
|
/build
|
||||||
/functions
|
/.svelte-kit
|
||||||
|
/package
|
||||||
.env
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
vite.config.js.timestamp-*
|
||||||
|
vite.config.ts.timestamp-*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,13 @@
|
||||||
.svelte-kit/**
|
.DS_Store
|
||||||
static/**
|
node_modules
|
||||||
build/**
|
/build
|
||||||
node_modules/**
|
/.svelte-kit
|
||||||
|
/package
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Ignore files for PNPM, NPM and YARN
|
||||||
|
pnpm-lock.yaml
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
{
|
{
|
||||||
"printWidth": 100
|
"plugins": ["prettier-plugin-svelte"],
|
||||||
|
"pluginSearchDirs": ["."],
|
||||||
|
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
README.md
14
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
# create-svelte
|
# create-svelte
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
|
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
||||||
|
|
||||||
## Creating a project
|
## Creating a project
|
||||||
|
|
||||||
|
|
@ -8,14 +8,12 @@ If you're seeing this, you've probably already done this step. Congrats!
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# create a new project in the current directory
|
# create a new project in the current directory
|
||||||
npm init svelte@next
|
npm create svelte@latest
|
||||||
|
|
||||||
# create a new project in my-app
|
# create a new project in my-app
|
||||||
npm init svelte@next my-app
|
npm create svelte@latest my-app
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: the `@next` is temporary
|
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
|
|
||||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||||
|
|
@ -29,10 +27,12 @@ npm run dev -- --open
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
|
To create a production version of your app:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
|
You can preview the production build with `npm run preview`.
|
||||||
|
|
||||||
|
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||||
|
|
|
||||||
1766
package-lock.json
generated
1766
package-lock.json
generated
File diff suppressed because it is too large
Load diff
51
package.json
51
package.json
|
|
@ -1,32 +1,35 @@
|
||||||
{
|
{
|
||||||
"name": "website",
|
"name": "website",
|
||||||
"version": "0.2.0",
|
"version": "0.0.1",
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "svelte-kit dev",
|
"dev": "vite dev",
|
||||||
"build": "svelte-kit build",
|
"build": "vite build",
|
||||||
"preview": "svelte-kit preview",
|
"preview": "vite preview",
|
||||||
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"format": "prettier --write --plugin-search-dir=. ."
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
||||||
|
"format": "prettier --plugin-search-dir . --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-vercel": "2.4.1",
|
"@sveltejs/adapter-auto": "^2.0.0",
|
||||||
"@sveltejs/kit": "1.14.0",
|
"@sveltejs/adapter-vercel": "^2.4.1",
|
||||||
"@typescript-eslint/eslint-plugin": "5.56.0",
|
"@sveltejs/kit": "^1.5.0",
|
||||||
"@typescript-eslint/parser": "5.56.0",
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||||
"autoprefixer": "10.4.14",
|
"@typescript-eslint/parser": "^5.45.0",
|
||||||
"cssnano": "5.1.15",
|
"autoprefixer": "^10.4.14",
|
||||||
"eslint": "8.36.0",
|
"eslint": "^8.28.0",
|
||||||
"eslint-config-prettier": "8.8.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-svelte3": "4.0.0",
|
"eslint-plugin-svelte3": "^4.0.0",
|
||||||
"postcss": "8.4.21",
|
"postcss": "^8.4.21",
|
||||||
"postcss-load-config": "4.0.1",
|
"prettier": "^2.8.0",
|
||||||
"prettier": "2.8.7",
|
"prettier-plugin-svelte": "^2.8.1",
|
||||||
"prettier-plugin-svelte": "2.10.0",
|
"svelte": "^3.54.0",
|
||||||
"svelte": "3.57.0",
|
"svelte-check": "^3.0.1",
|
||||||
"svelte-preprocess": "5.0.3",
|
"tailwindcss": "^3.2.7",
|
||||||
"tailwindcss": "3.2.7",
|
"tslib": "^2.4.1",
|
||||||
"tslib": "2.5.0",
|
"typescript": "^5.0.0",
|
||||||
"typescript": "5.0.2"
|
"vite": "^4.2.0"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,6 @@
|
||||||
const tailwindcss = require("tailwindcss");
|
|
||||||
const autoprefixer = require("autoprefixer");
|
|
||||||
const cssnano = require("cssnano");
|
|
||||||
|
|
||||||
const mode = process.env.NODE_ENV;
|
|
||||||
const dev = mode === "development";
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: [
|
plugins: {
|
||||||
// Some plugins, like postcss-nested, need to run before Tailwind
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
tailwindcss,
|
},
|
||||||
|
}
|
||||||
// But others, like autoprefixer, need to run after
|
|
||||||
|
|
||||||
autoprefixer,
|
|
||||||
|
|
||||||
!dev &&
|
|
||||||
cssnano({
|
|
||||||
preset: "default",
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
|
||||||
12
src/app.d.ts
vendored
Normal file
12
src/app.d.ts
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
// See https://kit.svelte.dev/docs/types#app
|
||||||
|
// for information about these interfaces
|
||||||
|
declare global {
|
||||||
|
namespace App {
|
||||||
|
// interface Error {}
|
||||||
|
// interface Locals {}
|
||||||
|
// interface PageData {}
|
||||||
|
// interface Platform {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {};
|
||||||
10
src/app.html
10
src/app.html
|
|
@ -2,11 +2,11 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
%svelte.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-900">
|
<body data-sveltekit-preload-data="hover">
|
||||||
<div id="svelte">%svelte.body%</div>
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
3
src/global.d.ts
vendored
3
src/global.d.ts
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
/// <reference types="@sveltejs/kit" />
|
|
||||||
/// <reference types="svelte" />
|
|
||||||
/// <reference types="vite/client" />
|
|
||||||
|
|
@ -5,7 +5,9 @@
|
||||||
export let mirrored: boolean = false;
|
export let mirrored: boolean = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={`flex flex-col md:flex-row ${mirrored && "md:flex-row-reverse"} m-8`}>
|
<div
|
||||||
|
class={`flex flex-col md:flex-row ${mirrored && "md:flex-row-reverse"} m-8`}
|
||||||
|
>
|
||||||
<img src={image} alt={`Grafik vom Charakter ${name}`} class="p-4" />
|
<img src={image} alt={`Grafik vom Charakter ${name}`} class="p-4" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import "../app.postcss";
|
import "../app.css";
|
||||||
import NavLink from "$lib/layout/NavLink.svelte";
|
import NavLink from "$lib/layout/NavLink.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -4,15 +4,17 @@
|
||||||
|
|
||||||
<h1>Welcome to SvelteKit</h1>
|
<h1>Welcome to SvelteKit</h1>
|
||||||
<p>
|
<p>
|
||||||
Visit <a class="text-blue-600 underline" href="https://kit.svelte.dev">kit.svelte.dev</a> to read the
|
Visit <a class="text-blue-600 underline" href="https://kit.svelte.dev"
|
||||||
documentation
|
>kit.svelte.dev</a
|
||||||
|
> to read the documentation
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p id="intro">
|
<p id="intro">
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur in gravida sem. Fusce tincidunt
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur in gravida
|
||||||
massa quis mauris posuere dictum. Aenean malesuada odio at congue luctus. Quisque rutrum, est at
|
sem. Fusce tincidunt massa quis mauris posuere dictum. Aenean malesuada odio
|
||||||
maximus pretium, justo mi fringilla augue, vel dictum leo elit id arcu. Nullam lacus turpis,
|
at congue luctus. Quisque rutrum, est at maximus pretium, justo mi fringilla
|
||||||
sagittis quis egestas a, tincidunt in lectus. Cras porta libero mauris, et condimentum magna
|
augue, vel dictum leo elit id arcu. Nullam lacus turpis, sagittis quis egestas
|
||||||
|
a, tincidunt in lectus. Cras porta libero mauris, et condimentum magna
|
||||||
venenatis id. Integer eu egestas lacus.
|
venenatis id. Integer eu egestas lacus.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -36,10 +38,11 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p id="listen">
|
<p id="listen">
|
||||||
Cras luctus commodo pharetra. Integer sollicitudin lectus non nibh congue egestas. Quisque
|
Cras luctus commodo pharetra. Integer sollicitudin lectus non nibh congue
|
||||||
lobortis, magna vitae consectetur mollis, purus dui sollicitudin ligula, vel condimentum nunc
|
egestas. Quisque lobortis, magna vitae consectetur mollis, purus dui
|
||||||
justo at tellus. Quisque ut ligula laoreet, pellentesque ligula nec, venenatis lacus. Quisque
|
sollicitudin ligula, vel condimentum nunc justo at tellus. Quisque ut ligula
|
||||||
magna nulla, mattis ac libero in, suscipit consectetur ex. Donec eget sem sollicitudin, varius
|
laoreet, pellentesque ligula nec, venenatis lacus. Quisque magna nulla, mattis
|
||||||
massa in, sodales neque. Vivamus fermentum tempus nunc, nec ultrices ante faucibus nec. Vivamus
|
ac libero in, suscipit consectetur ex. Donec eget sem sollicitudin, varius
|
||||||
vel sollicitudin velit.
|
massa in, sodales neque. Vivamus fermentum tempus nunc, nec ultrices ante
|
||||||
|
faucibus nec. Vivamus vel sollicitudin velit.
|
||||||
</p>
|
</p>
|
||||||
3
static/favicon.png
Normal file
3
static/favicon.png
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5146ed79b486cb9e1cdcdd7814cd22ae78e70ceb30fa06b4cd9a16cf121bc9e6
|
||||||
|
size 1571
|
||||||
|
|
@ -1,20 +1,17 @@
|
||||||
import preprocess from "svelte-preprocess";
|
import adapter from "@sveltejs/adapter-vercel";
|
||||||
import vercel from "@sveltejs/adapter-vercel";
|
import { vitePreprocess } from "@sveltejs/kit/vite";
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: [
|
preprocess: vitePreprocess(),
|
||||||
preprocess({
|
|
||||||
postcss: true,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
|
|
||||||
kit: {
|
kit: {
|
||||||
// hydrate the <div id="svelte"> element in src/app.html
|
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
||||||
target: "#svelte",
|
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||||
adapter: vercel(),
|
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||||
|
adapter: adapter(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,7 @@
|
||||||
const { tailwindExtractor } = require("tailwindcss/lib/lib/purgeUnusedStyles");
|
|
||||||
const colors = require("tailwindcss/colors");
|
const colors = require("tailwindcss/colors");
|
||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: "aot",
|
|
||||||
purge: {
|
|
||||||
content: ["./src/**/*.{html,js,svelte,ts}"],
|
content: ["./src/**/*.{html,js,svelte,ts}"],
|
||||||
options: {
|
|
||||||
defaultExtractor: (content) => [
|
|
||||||
// If this stops working, please open an issue at https://github.com/svelte-add/tailwindcss/issues rather than bothering Tailwind Labs about it
|
|
||||||
...tailwindExtractor(content),
|
|
||||||
// Match Svelte class: directives (https://github.com/tailwindlabs/tailwindcss/discussions/1731)
|
|
||||||
...[...content.matchAll(/(?:class:)*([\w\d-/:%.]+)/gm)].map(
|
|
||||||
([_match, group, ..._rest]) => group
|
|
||||||
),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
safelist: [/^svelte-[\d\w]+$/],
|
|
||||||
},
|
|
||||||
theme: {
|
theme: {
|
||||||
colors: {
|
colors: {
|
||||||
transparent: "transparent",
|
transparent: "transparent",
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,17 @@
|
||||||
{
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"moduleResolution": "node",
|
|
||||||
"module": "es2020",
|
|
||||||
"lib": ["es2020"],
|
|
||||||
"target": "es2019",
|
|
||||||
/**
|
|
||||||
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
|
|
||||||
to enforce using \`import type\` instead of \`import\` for Types.
|
|
||||||
*/
|
|
||||||
"importsNotUsedAsValues": "error",
|
|
||||||
"isolatedModules": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
/**
|
|
||||||
To have warnings/errors of the Svelte compiler at the correct position,
|
|
||||||
enable source maps by default.
|
|
||||||
*/
|
|
||||||
"sourceMap": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"baseUrl": ".",
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"checkJs": true,
|
"checkJs": true,
|
||||||
"paths": {
|
"esModuleInterop": true,
|
||||||
"$lib/*": ["src/lib/*"]
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"strict": true
|
||||||
}
|
}
|
||||||
},
|
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||||
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
|
//
|
||||||
|
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||||
|
// from the referenced tsconfig.json - TypeScript does not merge them in
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
vite.config.ts
Normal file
6
vite.config.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { sveltekit } from "@sveltejs/kit/vite";
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [sveltekit()],
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue