npx svelte-add@latest tailwindcss --typography --daisyui

This commit is contained in:
Emmanuel 2022-08-09 10:23:20 +02:00
parent 414b805677
commit 7af25b7a80
7 changed files with 1038 additions and 4 deletions

990
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -25,10 +25,16 @@
"prettier-plugin-svelte": "^2.7.0", "prettier-plugin-svelte": "^2.7.0",
"svelte": "^3.44.0", "svelte": "^3.44.0",
"svelte-check": "^2.7.1", "svelte-check": "^2.7.1",
"svelte-preprocess": "^4.10.6", "svelte-preprocess": "^4.10.7",
"tslib": "^2.3.1", "tslib": "^2.3.1",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"vite": "^3.0.0" "vite": "^3.0.0",
"postcss": "^8.4.14",
"postcss-load-config": "^4.0.1",
"autoprefixer": "^10.4.7",
"tailwindcss": "^3.1.5",
"@tailwindcss/typography": "^0.5.3",
"daisyui": "^2.18.1"
}, },
"type": "module" "type": "module"
} }

13
postcss.config.cjs Normal file
View file

@ -0,0 +1,13 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
const config = {
plugins: [
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(),
//But others, like autoprefixer, need to run after,
autoprefixer
]
};
module.exports = config;

4
src/app.css Normal file
View file

@ -0,0 +1,4 @@
/* Write your global styles here, in PostCSS syntax */
@tailwind base;
@tailwind components;
@tailwind utilities;

View file

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

View file

@ -5,7 +5,11 @@ import preprocess from 'svelte-preprocess';
const config = { const config = {
// Consult https://github.com/sveltejs/svelte-preprocess // Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors // for more information about preprocessors
preprocess: preprocess(), preprocess: [
preprocess({
postcss: true
})
],
kit: { kit: {
adapter: adapter() adapter: adapter()

14
tailwind.config.cjs Normal file
View file

@ -0,0 +1,14 @@
const daisyui = require('daisyui');
const typography = require('@tailwindcss/typography');
const config = {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {}
},
plugins: [typography, daisyui]
};
module.exports = config;