Skip to content

Commit 6228398

Browse files
committed
feat: update launch configurations and add tasks for SvelteKit development
1 parent 84f5582 commit 6228398

File tree

4 files changed

+171
-34
lines changed

4 files changed

+171
-34
lines changed

.vscode/launch.json

Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,90 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "full stack chrome",
6-
"request": "launch",
5+
"name": "🚀 SvelteKit: Dev Server (Full Stack)",
76
"type": "node",
8-
"runtimeArgs": ["--bun", "dev"],
7+
"request": "launch",
98
"runtimeExecutable": "bun",
9+
"runtimeArgs": ["--bun", "dev"],
1010
"console": "integratedTerminal",
11-
"skipFiles": ["<node_internals>/**"],
11+
"internalConsoleOptions": "neverOpen",
12+
"skipFiles": ["<node_internals>/**", "**/node_modules/**", "**/.svelte-kit/**"],
13+
"env": {
14+
"NODE_ENV": "development"
15+
},
1216
"serverReadyAction": {
13-
"pattern": "\\bLocal:\\s+(https?://\\S+\\d)",
14-
"uriFormat": "%s/demo",
15-
"action": "debugWithChrome",
16-
"killOnServerStop": true
17+
"pattern": "Local:\\s+(https?://\\S+)",
18+
"uriFormat": "%s",
19+
"action": "openExternally"
1720
}
1821
},
1922
{
20-
"name": "full stack edge",
21-
"request": "launch",
23+
"name": "🔍 SvelteKit: Server Only (SSR/Hooks)",
2224
"type": "node",
23-
"runtimeArgs": ["--bun", "dev"],
25+
"request": "launch",
2426
"runtimeExecutable": "bun",
27+
"runtimeArgs": ["--bun", "dev"],
2528
"console": "integratedTerminal",
26-
"skipFiles": ["<node_internals>/**"],
27-
"serverReadyAction": {
28-
"pattern": "\\bLocal:\\s+(https?://\\S+\\d)",
29-
"uriFormat": "%s/demo",
30-
"action": "debugWithEdge",
31-
"killOnServerStop": true
29+
"internalConsoleOptions": "neverOpen",
30+
"skipFiles": ["<node_internals>/**", "**/node_modules/**", "**/.svelte-kit/**"],
31+
"env": {
32+
"NODE_ENV": "development"
3233
}
3334
},
3435
{
35-
"name": "full stack test",
36+
"name": "🎨 Chrome: Attach to Running Dev Server",
3637
"type": "chrome",
3738
"request": "attach",
38-
"server": {
39-
"runtimeArgs": ["--bun", "dev"],
40-
"runtimeExecutable": "bun",
41-
"console": "integratedTerminal",
42-
"skipFiles": ["<node_internals>/**"]
39+
"port": 9222,
40+
"webRoot": "${workspaceFolder}",
41+
"sourceMaps": true,
42+
"sourceMapPathOverrides": {
43+
"/.svelte-kit/*": "${workspaceFolder}/.svelte-kit/*",
44+
"/src/*": "${workspaceFolder}/src/*"
45+
},
46+
"skipFiles": ["<node_internals>/**", "**/node_modules/**"]
47+
},
48+
{
49+
"name": "🧪 Cypress: E2E Tests",
50+
"type": "node",
51+
"request": "launch",
52+
"program": "${workspaceFolder}/node_modules/.bin/cypress",
53+
"args": ["open"],
54+
"console": "integratedTerminal",
55+
"internalConsoleOptions": "neverOpen"
56+
},
57+
{
58+
"name": "🧪 Cypress: Run Headless",
59+
"type": "node",
60+
"request": "launch",
61+
"runtimeExecutable": "npx",
62+
"runtimeArgs": ["cypress", "run"],
63+
"console": "integratedTerminal",
64+
"internalConsoleOptions": "neverOpen"
65+
},
66+
{
67+
"name": "👁️ Preview: Production Build",
68+
"type": "node",
69+
"request": "launch",
70+
"runtimeExecutable": "bun",
71+
"runtimeArgs": ["run", "preview"],
72+
"console": "integratedTerminal",
73+
"internalConsoleOptions": "neverOpen",
74+
"serverReadyAction": {
75+
"pattern": "Local:\\s+(https?://\\S+)",
76+
"uriFormat": "%s",
77+
"action": "openExternally"
4378
}
4479
}
80+
],
81+
"compounds": [
82+
{
83+
"name": "🔥 Full Stack: Server + Client Debug",
84+
"configurations": ["🔍 SvelteKit: Server Only (SSR/Hooks)", "🎨 Chrome: Attach to Running Dev Server"],
85+
"presentation": {
86+
"order": 1
87+
},
88+
"stopAll": true
89+
}
4590
]
4691
}

.vscode/tasks.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Dev: Start SvelteKit",
6+
"type": "shell",
7+
"command": "bun dev",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "sveltekit",
11+
"pattern": {
12+
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+TS(\\d+)\\s*:\\s*(.*)$",
13+
"file": 1,
14+
"location": 2,
15+
"severity": 3,
16+
"code": 4,
17+
"message": 5
18+
},
19+
"background": {
20+
"activeOnStart": true,
21+
"beginsPattern": "building",
22+
"endsPattern": "(Local|Network):\\s+http"
23+
}
24+
},
25+
"presentation": {
26+
"reveal": "always",
27+
"panel": "dedicated"
28+
},
29+
"group": {
30+
"kind": "build",
31+
"isDefault": false
32+
}
33+
},
34+
{
35+
"label": "Check: Svelte Types",
36+
"type": "shell",
37+
"command": "npx sv check",
38+
"problemMatcher": ["$tsc"],
39+
"presentation": {
40+
"reveal": "always",
41+
"panel": "shared"
42+
},
43+
"group": {
44+
"kind": "test",
45+
"isDefault": false
46+
}
47+
},
48+
{
49+
"label": "Format: Biome",
50+
"type": "shell",
51+
"command": "npx @biomejs/biome format --write .",
52+
"problemMatcher": [],
53+
"presentation": {
54+
"reveal": "silent",
55+
"panel": "shared"
56+
}
57+
},
58+
{
59+
"label": "Test: Vitest",
60+
"type": "shell",
61+
"command": "bun test",
62+
"problemMatcher": ["$tsc"],
63+
"presentation": {
64+
"reveal": "always",
65+
"panel": "shared"
66+
},
67+
"group": {
68+
"kind": "test",
69+
"isDefault": true
70+
}
71+
},
72+
{
73+
"label": "Test: Cypress E2E",
74+
"type": "shell",
75+
"command": "npx cypress run",
76+
"problemMatcher": [],
77+
"presentation": {
78+
"reveal": "always",
79+
"panel": "dedicated"
80+
},
81+
"group": {
82+
"kind": "test",
83+
"isDefault": false
84+
}
85+
},
86+
{
87+
"label": "Build: Package Library",
88+
"type": "shell",
89+
"command": "bun run package",
90+
"problemMatcher": ["$tsc"],
91+
"presentation": {
92+
"reveal": "always",
93+
"panel": "shared"
94+
},
95+
"group": {
96+
"kind": "build",
97+
"isDefault": true
98+
}
99+
}
100+
]
101+
}

src/lib/motion-start/render/html/utils/render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function renderHTML(
1313
styleProp?: MotionStyle,
1414
projection?: IProjectionNode<unknown>
1515
) {
16-
Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));
16+
Object.assign(element.style, style, projection?.getProjectionStyles(styleProp));
1717

1818
// Loop over any CSS variables and assign those.
1919
for (const key in vars) {

src/routes/+page.svelte

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<script lang="ts">
22
import { Button } from "$lib/components/ui/button";
3-
import { object, string } from "zod";
4-
import { useSearchParams } from "runed/kit";
53
import { page } from "$app/state";
64
75
// Dynamic imports for all test fixtures
@@ -11,17 +9,10 @@
119
let testName = $state("");
1210
let error = $state("");
1311
let loading = $state(true);
14-
const { test, example } = $derived(
15-
useSearchParams(
16-
object({
17-
test: string().optional(),
18-
example: string().optional(),
19-
}),
20-
),
21-
);
2212
2313
// Get test name from URL params
2414
$effect(() => {
15+
const test = page.url.searchParams.get("test");
2516
if (test && test !== testName) {
2617
testName = test;
2718
loadFixture(test);

0 commit comments

Comments
 (0)