Skip to content

Commit

Permalink
Replace sveltePreprocess with vitePreprocess in docs. Closes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Jan 20, 2024
1 parent 849cc31 commit f58a43d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/svelte-ux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"rehype-slug": "^6.0.0",
"svelte": "^4.2.8",
"svelte-check": "^3.6.3",
"svelte-preprocess": "^5.1.3",
"svelte2tsx": "^0.7.0",
"tailwindcss": "^3.4.1",
"tslib": "^2.6.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte-ux/src/lib/plugins/vite.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import s from 'sveld';
import sveltePreprocess from 'svelte-preprocess';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { preprocess } from 'svelte/compiler';
import qs from 'node:querystring';

Expand All @@ -12,7 +12,7 @@ export function sveld() {
if ('raw' in query && 'sveld' in query) {
const raw = JSON.parse(src.split('export default ')[1]);

let { code } = await preprocess(raw, sveltePreprocess(), {
let { code } = await preprocess(raw, vitePreprocess(), {
filename: id,
});
const data = new s.ComponentParser({
Expand Down
6 changes: 2 additions & 4 deletions packages/svelte-ux/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import { createLocaleSettings } from '$lib';
import LanguageSelect from '$lib/components/LanguageSelect.svelte';
import './app.css';
export let data: PageData;
const baseGh = 'https://github.com/techniq/svelte-ux';
Expand Down Expand Up @@ -290,10 +292,6 @@
</AppLayout>

<style lang="postcss">
@tailwind base;
@tailwind components;
@tailwind utilities;
:global(body) {
@apply bg-surface-200 accent-primary;
/* background-image:
Expand Down
3 changes: 3 additions & 0 deletions packages/svelte-ux/src/routes/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
4 changes: 2 additions & 2 deletions packages/svelte-ux/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-auto';
import sveltePreprocess from 'svelte-preprocess';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';

import mdsvexConfig from './mdsvex.config.js';
Expand All @@ -8,7 +8,7 @@ import { codePreview } from './src/lib/plugins/svelte.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexConfig.extensions],
preprocess: [mdsvex(mdsvexConfig), sveltePreprocess(), codePreview()],
preprocess: [mdsvex(mdsvexConfig), vitePreprocess(), codePreview()],

vitePlugin: {
inspector: {
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f58a43d

Please sign in to comment.