Tailwind setup

This commit is contained in:
I-Have-An-Issue 2022-10-01 21:24:34 -04:00
parent 10c90cb754
commit f05498c539
No known key found for this signature in database
GPG Key ID: E55435DEA0825091
8 changed files with 1931 additions and 69 deletions

1956
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,10 +12,17 @@
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-auto": "next", "@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "next", "@sveltejs/kit": "next",
"autoprefixer": "^10.4.12",
"postcss": "^8.4.17",
"prettier": "^2.6.2", "prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0", "prettier-plugin-svelte": "^2.7.0",
"svelte": "^3.44.0", "svelte": "^3.44.0",
"svelte-preprocess": "^4.10.7",
"tailwindcss": "^3.1.8",
"vite": "^3.1.0" "vite": "^3.1.0"
}, },
"type": "module" "type": "module",
"dependencies": {
"@sveltejs/adapter-node": "^1.0.0-next.96"
}
} }

6
postcss.config.cjs Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
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 @@
<h1>Welcome to SvelteKit</h1> <h1 class="text-3xl font-bold underline">Hello world!</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>

View File

@ -1,10 +1,16 @@
import adapter from '@sveltejs/adapter-auto'; import adapter from '@sveltejs/adapter-node';
import preprocess from "svelte-preprocess";
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
kit: { kit: {
adapter: adapter() adapter: adapter()
} },
preprocess: [
preprocess({
postcss: true,
}),
],
}; };
export default config; export default config;

8
tailwind.config.cjs Normal file
View File

@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {}
},
plugins: []
};