🚨 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, autoprefixer,
!dev && cssnano({ !dev &&
cssnano({
preset: "default", preset: "default",
}), }),
], ],

View File

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

View File

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