Skip to content

Commit 34c0cea

Browse files
committed
Update to svelte 5
1 parent 8a2a411 commit 34c0cea

16 files changed

+198
-213
lines changed

eslint.config.mjs

+4
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ export default [...compat.extends(
3434
},
3535

3636
rules: {},
37+
ignores: [
38+
"output/*",
39+
"data/*"
40+
]
3741
}];

package-lock.json

+66-87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"eslint-plugin-mocha": "^10.4.3",
7878
"eslint-plugin-n": "^17.9.0",
7979
"eslint-plugin-promise": "^7.1.0",
80-
"eslint-plugin-svelte": "^2.42.0",
80+
"eslint-plugin-svelte": "^2.46.1",
8181
"eslint-webpack-plugin": "^4.2.0",
8282
"globals": "^15.8.0",
8383
"html-webpack-plugin": "^5.6.0",
@@ -97,8 +97,8 @@
9797
"sass-loader": "^16.0.2",
9898
"sinon": "^19.0.2",
9999
"style-loader": "^4.0.0",
100-
"svelte": "^4.2.19",
101-
"svelte-eslint-parser": "^0.41.1",
100+
"svelte": "^5.15.0",
101+
"svelte-eslint-parser": "^0.42.0",
102102
"svelte-loader": "^3.2.3",
103103
"tmp": "^0.2.3",
104104
"url-loader": "^4.1.0",

src/renderer/AboutScreen.svelte

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
<div>
33
<h1>Before Dawn</h1>
44
<h2>// screensaver fun //</h2>
5+
{#await loadData() then}
56
<h3>{globals.APP_VERSION}</h3>
6-
7+
{/await}
78
<p>
89
An open-source screensaver project.<br>
910
<a
1011
href="http://muffinista.github.io/before-dawn/"
11-
on:click="{open}"
12+
onclick={open}
1213
>
1314
learn more
1415
</a>
@@ -18,7 +19,7 @@
1819
Having trouble?
1920
<a
2021
href="https://github.com/muffinista/before-dawn/issues"
21-
on:click="{open}">
22+
onclick={open}>
2223
please let us know!
2324
</a>
2425
</p>
@@ -77,7 +78,7 @@
7778
<small>
7879
<a
7980
href="https://thenounproject.com/search/?q=sunrise&i=172009"
80-
on:click="{open}">
81+
onclick={open}>
8182
App
8283
icon
8384
</a> Sun by Ale Estrada from the Noun Project
@@ -88,7 +89,7 @@
8889
<small>
8990
Powered by <a
9091
href="https://www.electronjs.org/"
91-
on:click="{open}"
92+
onclick={open}
9293
>
9394
Electron
9495
</a>
@@ -98,17 +99,15 @@
9899
</div>
99100

100101
<script>
101-
import { onMount } from "svelte";
102-
103102
console.log = window.api.log;
104103
window.addEventListener("error", console.log);
105104
window.addEventListener("unhandledrejection", console.log);
106105
107-
let globals = {};
106+
let globals = $state({});
108107
109-
onMount(async () => {
108+
async function loadData() {
110109
globals = await window.api.getGlobals();
111-
});
110+
}
112111
113112
function open(evt) {
114113
evt.preventDefault();

0 commit comments

Comments
 (0)