From eb3ddc9c23aa9d31239991103f90fa04e39eccff Mon Sep 17 00:00:00 2001 From: scosman Date: Mon, 30 Sep 2024 10:21:17 -0400 Subject: [PATCH] Improve checks.sh to run built (quietly) Fix build issues (static adapter pre-render setting global in layout) make VSCode autoformat --- .vscode/settings.json | 16 +++++++++++----- app/web_ui/src/routes/+layout.ts | 1 + checks.sh | 2 ++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 app/web_ui/src/routes/+layout.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index eccad60..ebd8885 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,11 +7,6 @@ }, "editor.tabSize": 4, }, - "eslint.validate": ["javascript", "javascriptreact", "svelte"], - // Svelte, JS, TS files - "[javascript, typescript, svelte, json]": { - "editor.defaultFormatter": "svelte.svelte-vscode" - }, "python.testing.pytestArgs": [ ".", "-s", @@ -26,4 +21,15 @@ "**/dist": true, "**/node_modules": true }, + // Svelte, JS, TS files + "[svelte]": { + "editor.defaultFormatter": "svelte.svelte-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "eslint.validate": ["javascript", "javascriptreact", "typescript", "svelte"], } diff --git a/app/web_ui/src/routes/+layout.ts b/app/web_ui/src/routes/+layout.ts new file mode 100644 index 0000000..176ae64 --- /dev/null +++ b/app/web_ui/src/routes/+layout.ts @@ -0,0 +1 @@ +export const prerender = true diff --git a/checks.sh b/checks.sh index 4524c76..2523f23 100755 --- a/checks.sh +++ b/checks.sh @@ -29,6 +29,8 @@ if [[ "$changed_files" == *"app/web_ui/"* ]]; then npm run format_check npm run lint npm run check + echo "Running vite build" + npm run build > /dev/null cd ../.. else echo "Skipping Web UI: no files changed"