Skip to content

Commit b75f335

Browse files
committed
move web to use tw v4
1 parent c169b7f commit b75f335

23 files changed

+1074
-1075
lines changed

.eslintignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 31 deletions
This file was deleted.

apps/web/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# SvelteKit Embed 🌱
22

3-
[docs](../../README.md)
3+
[docs](../../README.md)

apps/web/mdsvex.config.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

apps/web/package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,37 @@
1616
"build:packages": "pnpm -r --filter=\"../../packages/*\" run build"
1717
},
1818
"devDependencies": {
19+
"@eslint/compat": "^1.2.9",
20+
"@eslint/js": "^9.27.0",
1921
"@playwright/test": "^1.52.0",
20-
"@sveltejs/adapter-auto": "^4.0.0",
21-
"@sveltejs/kit": "^2.20.7",
22+
"@sveltejs/adapter-auto": "^6.0.1",
23+
"@sveltejs/kit": "^2.21.1",
2224
"@sveltejs/vite-plugin-svelte": "^5.0.3",
2325
"@tailwindcss/typography": "^0.5.16",
24-
"@types/eslint": "^9.6.1",
25-
"@typescript-eslint/eslint-plugin": "^8.31.0",
26-
"@typescript-eslint/parser": "^8.31.0",
27-
"autoprefixer": "^10.4.21",
28-
"daisyui": "^4.12.23",
29-
"eslint": "^9.25.1",
30-
"eslint-config-prettier": "^10.1.2",
31-
"eslint-plugin-svelte": "^2.46.1",
26+
"@tailwindcss/vite": "^4.1.7",
27+
"@testing-library/jest-dom": "^6.6.3",
28+
"@testing-library/svelte": "^5.2.8",
29+
"daisyui": "^5.0.38",
30+
"eslint": "^9.27.0",
31+
"eslint-config-prettier": "^10.1.5",
32+
"eslint-plugin-svelte": "^3.9.0",
3233
"fathom-client": "^3.7.2",
33-
"mdsvex": "^0.12.3",
34-
"postcss": "^8.5.3",
35-
"postcss-load-config": "^6.0.1",
34+
"mdsvex": "^0.12.6",
3635
"prettier": "^3.5.3",
37-
"prettier-plugin-svelte": "^3.3.3",
36+
"prettier-plugin-svelte": "^3.4.0",
3837
"prettier-plugin-tailwindcss": "^0.6.11",
3938
"rehype-autolink-headings": "^7.1.0",
39+
"rehype-external-links": "^3.0.0",
4040
"rehype-slug": "^6.0.0",
4141
"svead": "^0.0.4",
42-
"svelte": "5.33.1",
43-
"svelte-check": "^4.1.6",
42+
"svelte": "5.33.4",
43+
"svelte-check": "^4.2.1",
4444
"sveltekit-embed": "workspace:*",
45-
"tailwindcss": "^3.4.17",
46-
"tslib": "^2.8.1",
45+
"tailwindcss": "^4.1.7",
4746
"typescript": "^5.8.3",
48-
"vite": "^6.3.3",
49-
"vitest": "^3.1.2"
47+
"typescript-eslint": "^8.33.0",
48+
"vite": "^6.3.5",
49+
"vitest": "^3.1.4"
5050
},
5151
"type": "module"
52-
}
52+
}

apps/web/postcss.config.cjs

Lines changed: 0 additions & 13 deletions
This file was deleted.

apps/web/src/app.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import 'tailwindcss';
2+
3+
/* Plugin configurations */
4+
@plugin "@tailwindcss/typography";
5+
@plugin "daisyui" {
6+
themes:
7+
light --default,
8+
dark --prefersdark;
9+
}

apps/web/src/app.pcss

Lines changed: 0 additions & 38 deletions
This file was deleted.

apps/web/src/lib/icons/git-hub.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script lang="ts">
2-
export let width: string = '25'
3-
export let height: string = '25'
4-
export let fill: string = 'fill-current'
2+
export let width: string = '25';
3+
export let height: string = '25';
4+
export let fill: string = 'fill-current';
55
6-
let svgClass: string = `${fill} text-primary-content transition hover:text-secondary-focus`
6+
let svgClass: string = `${fill} text-primary-content transition hover:text-secondary-focus`;
77
</script>
88

99
<svg

apps/web/src/lib/icons/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { default as GitHub } from './git-hub.svelte'
2-
export { default as Twitter } from './twitter.svelte'
3-
export { default as YouTube } from './you-tube.svelte'
1+
export { default as GitHub } from './git-hub.svelte';
2+
export { default as Twitter } from './twitter.svelte';
3+
export { default as YouTube } from './you-tube.svelte';

apps/web/src/lib/icons/twitter.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
viewBox="0 0 24 24"
55
height="25"
66
width="25"
7-
class="fill-current text-primary-content transition hover:text-secondary-focus"
7+
class="text-primary-content hover:text-secondary-focus fill-current transition"
88
>
99
<path
1010
d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"

apps/web/src/lib/icons/you-tube.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
viewBox="0 0 24 24"
55
height="25"
66
width="25"
7-
class="fill-current text-primary-content transition hover:text-secondary-focus"
7+
class="text-primary-content hover:text-secondary-focus fill-current transition"
88
>
99
<path
1010
d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"

apps/web/src/prism.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
code[class*='language-'],
1010
pre[class*='language-'] {
1111
color: #d6deeb;
12-
font-family: 'Victor Mono', Consolas, Monaco, 'Andale Mono',
13-
'Ubuntu Mono', monospace;
12+
font-family:
13+
'Victor Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono',
14+
monospace;
1415
text-align: left;
1516
white-space: pre;
1617
word-spacing: normal;

apps/web/src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import spencee_img from '$lib/images/spencee.png';
1010
import * as Fathom from 'fathom-client';
1111
import { onMount } from 'svelte';
12-
import '../app.pcss';
12+
import '../app.css';
1313
import '../prism.css';
1414
1515
export let data;

apps/web/src/routes/+page.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ Output:
794794
- `modestBranding`: Use minimal YouTube branding (default: false)
795795
- `rel`: Show related videos at the end (default: false)
796796
- `aspectRatio`: Set the aspect ratio (default: '16:9')
797-
- `skipTo`: Start at specific timestamp (default: { h: 0, m: 0, s: 0
798-
})
797+
- `skipTo`: Start at specific timestamp (default:
798+
`{ h: 0, m: 0, s: 0 }`)
799799
- `disable_observer`: Disable lazy loading (default: false)
800800
- `iframe_styles`: Custom CSS styles for the iframe
801801

apps/web/src/routes/back-to-top.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<script lang="ts">
2-
import { fly } from 'svelte/transition'
2+
import { fly } from 'svelte/transition';
33
4-
let showScrollButton = false
4+
let showScrollButton = false;
55
66
function scrollToTop() {
77
window.scrollTo({
88
top: 0,
99
behavior: 'smooth',
10-
})
10+
});
1111
}
1212
1313
function handleScroll() {
14-
showScrollButton = window.pageYOffset > 0
14+
showScrollButton = window.pageYOffset > 0;
1515
}
1616
</script>
1717

@@ -21,7 +21,7 @@
2121
<button
2222
on:click={scrollToTop}
2323
transition:fly={{ y: 200, duration: 300 }}
24-
class="fixed bottom-8 right-8 btn btn-secondary normal-case shadow-2xl"
24+
class="btn btn-secondary fixed bottom-8 right-8 normal-case shadow-2xl"
2525
>
2626
Back to top
2727
</button>

apps/web/svelte.config.js

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
1-
import { mdsvex } from 'mdsvex';
2-
import mdsvexConfig from './mdsvex.config.js';
31
import adapter from '@sveltejs/adapter-auto';
42
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3+
import { mdsvex } from 'mdsvex';
4+
import autolinkHeadings from 'rehype-autolink-headings';
5+
import rehypeExternalLinks from 'rehype-external-links';
6+
import slugPlugin from 'rehype-slug';
57

6-
/** @type {import('@sveltejs/kit').Config} */
78
const config = {
8-
extensions: ['.svelte', ...mdsvexConfig.extensions],
9-
10-
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
11-
// for more information about preprocessors
12-
preprocess: [vitePreprocess({}), mdsvex(mdsvexConfig)],
13-
14-
kit: {
15-
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
16-
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
17-
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
18-
adapter: adapter(),
19-
},
9+
preprocess: [
10+
vitePreprocess({}),
11+
mdsvex({
12+
extensions: ['.md'],
13+
smartypants: true,
14+
rehypePlugins: [
15+
slugPlugin,
16+
[
17+
autolinkHeadings,
18+
{
19+
behavior: 'wrap',
20+
},
21+
],
22+
[
23+
rehypeExternalLinks,
24+
{ target: '_blank', rel: 'noopener noreferrer' },
25+
],
26+
],
27+
}),
28+
],
29+
kit: { adapter: adapter() },
30+
extensions: ['.svelte', '.md'],
2031
};
2132

2233
export default config;

apps/web/tailwind.config.cjs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)