🚨 Format and lint files

This commit is contained in:
RaviAnand Mohabir 2021-05-21 15:13:23 +02:00
parent 7582c75699
commit 7745dba5f9
6 changed files with 82 additions and 78 deletions

View File

@ -15,7 +15,8 @@ module.exports = {
autoprefixer,
!dev && cssnano({
!dev &&
cssnano({
preset: "default",
}),
],

View File

@ -1,2 +1,5 @@
<h1>Welcome to SvelteKit</h1>
<p>Visit <a class="text-blue-600 underline" href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
<p>
Visit <a class="text-blue-600 underline" href="https://kit.svelte.dev">kit.svelte.dev</a> to read the
documentation
</p>

View File

@ -1,4 +1,4 @@
import preprocess from 'svelte-preprocess';
import preprocess from "svelte-preprocess";
/** @type {import('@sveltejs/kit').Config} */
const config = {
@ -6,14 +6,14 @@ const config = {
// for more information about preprocessors
preprocess: [
preprocess({
postcss: true
postcss: true,
}),
],
kit: {
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte'
}
target: "#svelte",
},
};
export default config;

View File

@ -3,15 +3,15 @@ const { tailwindExtractor } = require("tailwindcss/lib/lib/purgeUnusedStyles");
module.exports = {
mode: "aot",
purge: {
content: [
"./src/**/*.{html,js,svelte,ts}",
],
content: ["./src/**/*.{html,js,svelte,ts}"],
options: {
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
...tailwindExtractor(content),
// 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,
),
],
},
safelist: [/^svelte-[\d\w]+$/],