Migrated from svelte vite plugin to sveltekit
2
.gitignore
vendored
@@ -38,3 +38,5 @@ package-lock.json
|
|||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
|
.svelte-kit
|
||||||
|
|||||||
12
jsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"module": "NodeNext",
|
||||||
|
"moduleResolution": "NodeNext"
|
||||||
|
}
|
||||||
|
}
|
||||||
58
package.json
@@ -1,21 +1,49 @@
|
|||||||
{
|
{
|
||||||
"name": "vite-svelte-starter",
|
"name": "am-d-model.eu",
|
||||||
"version": "0.1.0",
|
"version": "0.0.1",
|
||||||
"description": "",
|
|
||||||
"keywords": [],
|
|
||||||
"devDependencies": {
|
|
||||||
"@sveltejs/vite-plugin-svelte": "^2.0.0",
|
|
||||||
"svelte": "^4.2.3",
|
|
||||||
"svelte-preprocess": "^5.1.3",
|
|
||||||
"sass": "^1.72.0",
|
|
||||||
"vite": "^4.0.3"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite dev",
|
||||||
"build": "vite build",
|
"build": "vite build && npm run package",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview",
|
||||||
|
"package": "svelte-kit sync && svelte-package && publint",
|
||||||
|
"prepublishOnly": "npm run package"
|
||||||
},
|
},
|
||||||
"browserslist": ["> 1%", "last 2 versions", "not dead"],
|
"files": [
|
||||||
|
"dist",
|
||||||
|
"!dist/**/*.test.*",
|
||||||
|
"!dist/**/*.spec.*"
|
||||||
|
],
|
||||||
|
"sideEffects": [
|
||||||
|
"**/*.css"
|
||||||
|
],
|
||||||
|
"svelte": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"svelte": "./dist/index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"svelte": "^5.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@sveltejs/adapter-auto": "^3.3.1",
|
||||||
|
"@sveltejs/kit": "^2.15.2",
|
||||||
|
"@sveltejs/package": "^2.3.7",
|
||||||
|
"@sveltejs/vite-plugin-svelte": "^4.0.4",
|
||||||
|
"svelte": "^5.17.3",
|
||||||
|
"svelte-preprocess": "^5.1.4",
|
||||||
|
"sass": "^1.83.1",
|
||||||
|
"autoprefixer": "^10.4.20",
|
||||||
|
"publint": "^0.2.12",
|
||||||
|
"tailwindcss": "^3.4.17",
|
||||||
|
"typescript": "^5.7.3",
|
||||||
|
"vite": "^5.4.11"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@tailwindcss/forms": "^0.5.10"
|
||||||
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
6
postcss.config.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export default {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<script>
|
|
||||||
import LandingPage from "./LandingPage/LandingPage.svelte";
|
|
||||||
import "./vars.css";
|
|
||||||
import "./styles.css";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<LandingPage />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
||||||
3
src/app.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
@import 'tailwindcss/base';
|
||||||
|
@import 'tailwindcss/components';
|
||||||
|
@import 'tailwindcss/utilities'
|
||||||
15
src/app.html
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
%sveltekit.head%
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body data-sveltekit-preload-data="hover">
|
||||||
|
<div>%sveltekit.body%</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import "./NavigationFooter.scss";
|
import "$lib/styles/NavigationFooter.scss";
|
||||||
import "../shared_components/ScrollToTop.svelte";
|
import ScrollToTop from "$lib/components/ScrollToTop.svelte";
|
||||||
import ScrollToTop from "./ScrollToTop.svelte";
|
import Link from "$lib/components/Link.svelte";
|
||||||
import Link from "./Link.svelte";
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="navigation-footer">
|
<div class="navigation-footer">
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
export let button_text_class;
|
export let button_text_class;
|
||||||
export let display_title = true;
|
export let display_title = true;
|
||||||
|
|
||||||
import "./NavigationHeader.scss";
|
import "$lib/styles/NavigationHeader.scss";
|
||||||
import Button from "./Button.svelte";
|
import Button from "$lib/components/Button.svelte";
|
||||||
import Link from "./Link.svelte";
|
import Link from "$lib/components/Link.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={$$props.class}>
|
<div class={$$props.class}>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@import url('https://fonts.cdnfonts.com/css/martel-2');
|
@import url("https://fonts.cdnfonts.com/css/martel-2");
|
||||||
@import url('https://fonts.cdnfonts.com/css/assistant');
|
@import url("https://fonts.cdnfonts.com/css/assistant");
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* Colors */
|
/* Colors */
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import App from './App.svelte';
|
|
||||||
|
|
||||||
|
|
||||||
const app = new App({
|
|
||||||
target: document.getElementById('app'),
|
|
||||||
})
|
|
||||||
export default app
|
|
||||||
8
src/routes/+layout.svelte
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<script>
|
||||||
|
import "$lib/styles/styles.css";
|
||||||
|
import "$lib/styles/vars.css";
|
||||||
|
import "../app.css";
|
||||||
|
let { children } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{@render children()}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import "./LandingPage.scss";
|
import "./LandingPage.scss";
|
||||||
import NavigationHeader from "../shared_components/NavigationHeader.svelte";
|
import NavigationHeader from "$lib/components/NavigationHeader.svelte";
|
||||||
import "./NavigationHeader.scss";
|
import "./NavigationHeader.scss";
|
||||||
import NavigationFooter from "../shared_components/NavigationFooter.svelte";
|
import NavigationFooter from "$lib/components/NavigationFooter.svelte";
|
||||||
import Splash from "./Splash.svelte";
|
import Splash from "./Splash.svelte";
|
||||||
import InfoScroll from "./InfoScroll.svelte";
|
import InfoScroll from "./InfoScroll.svelte";
|
||||||
import BottomCall from "./BottomCall.svelte";
|
import BottomCall from "./BottomCall.svelte";
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import "./BottomCall.scss";
|
import "./BottomCall.scss";
|
||||||
import Button from "../shared_components/Button.svelte";
|
import Button from "$lib/components/Button.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="btmcall">
|
<div class="btmcall">
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import "./Splash.scss";
|
import "./Splash.scss";
|
||||||
import Button from "../shared_components/Button.svelte";
|
import Button from "$lib/components/Button.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="splash">
|
<div class="splash">
|
||||||
1
src/routes/about/+page.svelte
Normal file
@@ -0,0 +1 @@
|
|||||||
|
About page placeholder
|
||||||
1
src/routes/contact/+page.svelte
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Contact page placeholder
|
||||||
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 532 B |
BIN
static/favicon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 702 B |
@@ -1,8 +1,12 @@
|
|||||||
import preprocess from "svelte-preprocess";
|
import preprocess from "svelte-preprocess";
|
||||||
|
import adapter from '@sveltejs/adapter-auto';
|
||||||
|
|
||||||
const config = {
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
|
const config = {
|
||||||
preprocess: preprocess({}),
|
preprocess: preprocess({}),
|
||||||
};
|
kit: {
|
||||||
|
adapter: adapter()
|
||||||
export default config;
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
|
|||||||
12
tailwind.config.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import forms from '@tailwindcss/forms';
|
||||||
|
|
||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
export default {
|
||||||
|
content: ['./src/**/*.{html,js,svelte,ts}'],
|
||||||
|
|
||||||
|
theme: {
|
||||||
|
extend: {}
|
||||||
|
},
|
||||||
|
|
||||||
|
plugins: [forms]
|
||||||
|
};
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
import {svelte} from '@sveltejs/vite-plugin-svelte'
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [svelte()],
|
plugins: [sveltekit()]
|
||||||
})
|
});
|
||||||
|
|||||||