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": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"lint": "prettier --check .",
"format": "prettier --write ."
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.32",
"svelte": "^4.2.7",
"tailwindcss": "^3.4.0",
"vite": "^5.0.3"
},
"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>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
<h1 class="text-6xl font-bold underline">
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 { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').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.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
}
},
preprocess: vitePreprocess()
};
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: [],
}