added tailwind and vite

This commit is contained in:
Felix Baumgärtner 2024-01-03 21:19:14 +01:00
parent a78454c733
commit c235dde8d0
8 changed files with 1527 additions and 10 deletions

1490
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,17 +5,16 @@
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
"build": "vite build", "build": "vite build",
"preview": "vite preview", "preview": "vite preview"
"lint": "prettier --check .",
"format": "prettier --write ."
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0", "@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0", "@sveltejs/vite-plugin-svelte": "^3.0.0",
"prettier": "^3.1.1", "autoprefixer": "^10.4.16",
"prettier-plugin-svelte": "^3.1.2", "postcss": "^8.4.32",
"svelte": "^4.2.7", "svelte": "^4.2.7",
"tailwindcss": "^3.4.0",
"vite": "^5.0.3" "vite": "^5.0.3"
}, },
"type": "module" "type": "module"

6
postcss.config.js Normal file
View File

@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

3
src/app.css Normal file
View File

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -0,0 +1,5 @@
<script>
import "../app.css";
</script>
<slot />

View File

@ -1,2 +1,9 @@
<h1>Welcome to SvelteKit</h1> <h1 class="text-6xl font-bold underline">
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> Hello world!
</h1>
<style lang="postcss">
:global(html) {
background-color: theme(colors.gray.100);
}
</style>

View File

@ -1,4 +1,5 @@
import adapter from '@sveltejs/adapter-auto'; import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
@ -7,7 +8,8 @@ const config = {
// If your environment is not supported or you settled on a specific environment, switch out the adapter. // If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters. // See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter() adapter: adapter()
} },
preprocess: vitePreprocess()
}; };
export default config; export default config;

9
tailwind.config.js Normal file
View File

@ -0,0 +1,9 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {},
},
plugins: [],
}