Skip to content

Commit 43ece0a

Browse files
authored
Transition to Svelte 5 + shadcn (#315)
* Start Svelte 5 migration * Update pnpm-lock.yaml * Update svelte * More Svelte5 + shadcn conversion * More conversion towards shadcn-ui * Update dependencies * Enable single bundle builds * More fixes * Improve UI more * pnpm run format * oops * Replace rest of fontawesome icons with lucide * Update dependencies * Finish Svelte5 transition * Some more minor final UI tweaks * Maybe fix tests
1 parent 207531d commit 43ece0a

File tree

88 files changed

+2885
-1393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2885
-1393
lines changed

data/.gitkeep

Whitespace-only changes.

frontend/.eslintignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ node_modules
77
.env.*
88
!.env.example
99

10-
# Ignore files for PNPM, NPM and YARN
10+
# Package Managers
1111
pnpm-lock.yaml
1212
package-lock.json
1313
yarn.lock
14+
15+
# Generated or imported files
16+
/components.json
17+
/src/lib/_fbs
18+
/src/lib/components/ui

frontend/.eslintrc.cjs

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

frontend/.gitignore

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
.DS_Store
1+
test-results
22
node_modules
3-
/build
3+
4+
# Output
5+
.output
6+
.vercel
7+
.netlify
8+
.wrangler
49
/.svelte-kit
5-
/package
10+
/build
11+
12+
# OS
13+
.DS_Store
14+
Thumbs.db
15+
16+
# Env
617
.env
718
.env.*
819
!.env.example
20+
!.env.test
21+
22+
# Vite
923
vite.config.js.timestamp-*
1024
vite.config.ts.timestamp-*

frontend/.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
engine-strict=true
1+
engine-strict=true

frontend/.prettierignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ node_modules
77
.env.*
88
!.env.example
99

10-
# Ignore files for PNPM, NPM and YARN
10+
# Package Managers
1111
pnpm-lock.yaml
1212
package-lock.json
1313
yarn.lock
14+
15+
# Generated or imported files
16+
/components.json
17+
/src/lib/_fbs
18+
/src/lib/components/ui

frontend/.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"singleQuote": true,
66
"trailingComma": "es5",
77
"printWidth": 100,
8-
"plugins": ["prettier-plugin-svelte"],
9-
"pluginSearchDirs": ["."],
8+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
109
"overrides": [
1110
{ "files": "*.svelte", "options": { "parser": "svelte" } },
1211
{ "files": "package*.json", "options": { "tabWidth": 2, "useTabs": true } }

frontend/components.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://next.shadcn-svelte.com/schema.json",
3+
"style": "default",
4+
"tailwind": {
5+
"config": "tailwind.config.ts",
6+
"css": "src\\app.tcss",
7+
"baseColor": "slate"
8+
},
9+
"aliases": {
10+
"components": "$lib/components",
11+
"utils": "$lib/utils",
12+
"ui": "$lib/components/ui",
13+
"hooks": "$lib/hooks"
14+
},
15+
"typescript": true,
16+
"registry": "https://next.shadcn-svelte.com/registry"
17+
}

frontend/e2e/demo.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { expect, test } from '@playwright/test';
2+
3+
test('home page has expected h3', async ({ page }) => {
4+
await page.goto('/');
5+
await expect(page.locator('h3')).toBeVisible();
6+
});

frontend/eslint.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import prettier from 'eslint-config-prettier';
2+
import js from '@eslint/js';
3+
import { includeIgnoreFile } from '@eslint/compat';
4+
import svelte from 'eslint-plugin-svelte';
5+
import globals from 'globals';
6+
import { fileURLToPath } from 'node:url';
7+
import ts from 'typescript-eslint';
8+
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
9+
10+
export default ts.config(
11+
includeIgnoreFile(gitignorePath),
12+
js.configs.recommended,
13+
...ts.configs.recommended,
14+
...svelte.configs['flat/recommended'],
15+
prettier,
16+
...svelte.configs['flat/prettier'],
17+
{
18+
languageOptions: {
19+
globals: {
20+
...globals.browser,
21+
...globals.node,
22+
},
23+
},
24+
},
25+
{
26+
files: ['**/*.svelte'],
27+
28+
languageOptions: {
29+
parserOptions: {
30+
parser: ts.parser,
31+
},
32+
},
33+
}
34+
);

0 commit comments

Comments
 (0)