-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor @tomic/svelte to Svelte 5 and update sveltekit-site template
- Loading branch information
Showing
66 changed files
with
1,253 additions
and
1,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/bin | ||
|
||
/templates/**/ontologies/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
browser/create-template/templates/sveltekit-site/src/lib/atomic/getAllBlogposts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 7 additions & 9 deletions
16
browser/create-template/templates/sveltekit-site/src/lib/atomic/getStore.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
import { get } from 'svelte/store'; | ||
import { initStore, store as atomicStore } from '@tomic/svelte'; | ||
import { Store } from '@tomic/lib'; | ||
import { PUBLIC_ATOMIC_SERVER_URL } from '$env/static/public'; | ||
import { initOntologies } from '$lib/ontologies'; | ||
|
||
// We use a global store. Keep in mind that this means the cache is shared between sessions. Don't do this if you have data that should only be available to certain agents. | ||
let store: Store | undefined; | ||
|
||
const init = () => { | ||
const atomicStore = new Store({ | ||
store = new Store({ | ||
serverUrl: PUBLIC_ATOMIC_SERVER_URL | ||
}); | ||
initStore(atomicStore); | ||
|
||
initOntologies(); | ||
}; | ||
|
||
export const getStore = () => { | ||
let store = get(atomicStore); | ||
|
||
export const getStore = (): Store => { | ||
if (store === undefined) { | ||
init(); | ||
store = get(atomicStore); | ||
} | ||
|
||
return store; | ||
return store!; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
browser/create-template/templates/sveltekit-site/src/lib/components/Loader.svelte
This file was deleted.
Oops, something went wrong.
28 changes: 13 additions & 15 deletions
28
browser/create-template/templates/sveltekit-site/src/lib/components/Navbar.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.