Skip to content
Snippets Groups Projects
Commit e4bb4064 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Prettify.

parent 9b842bec
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,8 @@ module.exports = { ...@@ -15,7 +15,8 @@ module.exports = {
autoprefixer, autoprefixer,
!dev && cssnano({ !dev &&
cssnano({
preset: "default", preset: "default",
}), }),
], ],
......
...@@ -6,11 +6,7 @@ ...@@ -6,11 +6,7 @@
}; };
</script> </script>
<button on:click={increment}> <style lang="postcss">
Clicks: {count}
</button>
<style style lang="postcss">
button { button {
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit;
...@@ -34,3 +30,5 @@ ...@@ -34,3 +30,5 @@
@apply bg-red-500 bg-opacity-20; @apply bg-red-500 bg-opacity-20;
} }
</style> </style>
<button on:click={increment}> Clicks: {count} </button>
<script lang="ts"> <script lang="ts">
import Counter from '$lib/Counter.svelte'; import Counter from "$lib/Counter.svelte";
</script> </script>
<main> <style lang="postcss">
<h1>Hello world!</h1>
<Counter />
<p>Visit <a class="text-blue-600 underline" href="https://svelte.dev">svelte.dev</a> to learn how to build Svelte apps.</p>
</main>
<style style lang="postcss">
:root { :root {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
'Open Sans', 'Helvetica Neue', sans-serif; Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
} }
main { main {
...@@ -48,3 +40,15 @@ ...@@ -48,3 +40,15 @@
} }
} }
</style> </style>
<main>
<h1>Hello world!</h1>
<Counter />
<p>
Visit
<a class="text-blue-600 underline" href="https://svelte.dev">svelte.dev</a>
to learn how to build Svelte apps.
</p>
</main>
const sveltePreprocess = require('svelte-preprocess'); const sveltePreprocess = require("svelte-preprocess");
const node = require('@sveltejs/adapter-node'); const node = require("@sveltejs/adapter-node");
const pkg = require('./package.json'); const pkg = require("./package.json");
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
module.exports = { module.exports = {
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
defaults: { defaults: {
style: "postcss", style: "postcss",
}, },
postcss: true postcss: true,
}), }),
], ],
kit: { kit: {
...@@ -21,12 +21,12 @@ module.exports = { ...@@ -21,12 +21,12 @@ module.exports = {
adapter: node(), adapter: node(),
// hydrate the <div id="svelte"> element in src/app.html // hydrate the <div id="svelte"> element in src/app.html
target: '#svelte', target: "#svelte",
vite: { vite: {
ssr: { ssr: {
noExternal: Object.keys(pkg.dependencies || {}) noExternal: Object.keys(pkg.dependencies || {}),
} },
} },
} },
}; };
...@@ -2,15 +2,15 @@ const { tailwindExtractor } = require("tailwindcss/lib/lib/purgeUnusedStyles"); ...@@ -2,15 +2,15 @@ const { tailwindExtractor } = require("tailwindcss/lib/lib/purgeUnusedStyles");
module.exports = { module.exports = {
purge: { purge: {
content: [ content: ["./src/**/*.{html,js,svelte,ts}"],
"./src/**/*.{html,js,svelte,ts}",
],
options: { options: {
defaultExtractor: (content) => [ defaultExtractor: (content) => [
// If this stops working, please open an issue at https://github.com/svelte-add/tailwindcss/issues rather than bothering Tailwind Labs about it // If this stops working, please open an issue at https://github.com/svelte-add/tailwindcss/issues rather than bothering Tailwind Labs about it
...tailwindExtractor(content), ...tailwindExtractor(content),
// Match Svelte class: directives (https://github.com/tailwindlabs/tailwindcss/discussions/1731) // Match Svelte class: directives (https://github.com/tailwindlabs/tailwindcss/discussions/1731)
...[...content.matchAll(/(?:class:)*([\w\d-/:%.]+)/gm)].map(([_match, group, ..._rest]) => group), ...[...content.matchAll(/(?:class:)*([\w\d-/:%.]+)/gm)].map(
([_match, group, ..._rest]) => group
),
], ],
keyframes: true, keyframes: true,
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment