Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Fix Svelte build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanlangston committed Nov 29, 2023
1 parent 675d70a commit 4195243
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 72 deletions.
120 changes: 68 additions & 52 deletions src/scale-website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/scale-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"postcss": "^8.4.31",
"postcss-load-config": "^4.0.2",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
Expand Down
2 changes: 0 additions & 2 deletions src/scale-website/src/lib/localizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ class LocaleGroup {

export class Localizer {
public static GetLocale(): Locales {

const allLocales = Object.entries(Locales).map((_, locale) => new LocaleGroup(locale));
const sortedLocales = allLocales.filter(l => l.Index > -1).sort((a, b) => a.Index - b.Index);
console.log(sortedLocales);
const match = sortedLocales.at(0);
if (match == undefined) return Locales.unknown;
return match.Locale;
Expand Down
18 changes: 0 additions & 18 deletions src/scale-website/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
<script>
import "../app.postcss";
// if you want to Generate a SPA
// you have to set ssr to false.
// This is not the case (so set as true or comment the line)
// Documentation: https://kit.svelte.dev/docs/page-options#ssr
export const ssr = true;
// How to manage the trailing slashes in the URLs
// the URL for about page witll be /about with 'ignore' (default)
// the URL for about page witll be /about/ with 'always'
// https://kit.svelte.dev/docs/page-options#trailingslash
export const trailingSlash = 'ignore';
</script>

<slot />
9 changes: 9 additions & 0 deletions src/scale-website/src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import "../app.postcss";

export const prerender = true;

// How to manage the trailing slashes in the URLs
// the URL for about page witll be /about with 'ignore' (default)
// the URL for about page witll be /about/ with 'always'
// https://kit.svelte.dev/docs/page-options#trailingslash
export const trailingSlash = 'ignore';

0 comments on commit 4195243

Please sign in to comment.