Skip to content

Commit

Permalink
Refactor lib and components project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
OLILHR committed Nov 4, 2024
1 parent 3f41646 commit 1f0d5ec
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<script lang="ts">
import { goto } from "$app/navigation";
import { base } from "$app/paths";
import { EbdSelect, ExportButton, FormatVersionSelect, IconLogo } from "$lib";
import {
EbdSelect,
ExportButton,
FormatVersionSelect,
IconLogo,
} from "$lib/components";
type FormatVersion = {
code: string;
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions src/lib/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// shared components
export { default as Footer } from "./shared/footer.svelte";
export { default as Header } from "./shared/header.svelte";
export { default as IconLogin } from "./shared/icon-login.svelte";
export { default as IconLogo } from "./shared/icon-logo.svelte";
export { default as IconLogout } from "./shared/icon-logout.svelte";
export { default as LoginButton } from "./shared/login-button.svelte";
export { default as ToolsBanner } from "./shared/tools-banner.svelte";

// features
export { default as EbdFormHeader } from "./features/ebd-form-header.svelte";
export { default as EbdSelect } from "./features/ebd-select.svelte";
export { default as ExportButton } from "./features/export-button.svelte";
export { default as FormatVersionSelect } from "./features/format-version-select.svelte";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { base } from "$app/paths";
import { IconLogo } from "$lib";
import { IconLogo } from "$lib/components";
export let background = "bg-secondary";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { base } from "$app/paths";
import { IconLogo } from "$lib";
import { IconLogo } from "$lib/components";
</script>

<header class="bg-secondary">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import { onMount } from "svelte";
import { IconLogin, IconLogout } from "$lib";
import { IconLogin, IconLogout } from "$lib/components";
import auth from "../../auth/authService";
import { isAuthenticated, user } from "../../store";
import auth from "../../../auth/authService";
import { isAuthenticated, user } from "../../../store";
let userEmail: string = "";
Expand Down
File renamed without changes.
14 changes: 0 additions & 14 deletions src/lib/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { goto } from "$app/navigation";
import { base } from "$app/paths";
import { page } from "$app/stores";
import { Footer } from "$lib";
import { Footer } from "$lib/components";
import auth from "../auth/authService";
import { isAuthenticated } from "../store";
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { goto } from "$app/navigation";
import { base } from "$app/paths";
import { LoginButton, ToolsBanner } from "$lib";
import { LoginButton, ToolsBanner } from "$lib/components";
import auth from "../auth/authService";
import { isAuthenticated } from "../store";
Expand Down
2 changes: 1 addition & 1 deletion src/routes/ebd/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { goto } from "$app/navigation";
import { base } from "$app/paths";
import { EbdSelect, FormatVersionSelect, Header } from "$lib";
import { EbdSelect, FormatVersionSelect, Header } from "$lib/components";
import type { PageData } from "./$types";
Expand Down
2 changes: 1 addition & 1 deletion src/routes/ebd/[...ebd]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import "../../../app.scss";
import { page } from "$app/stores";
import { EbdFormHeader } from "$lib";
import { EbdFormHeader } from "$lib/components";
$: ({ formatVersions, ebds } = $page.data);
$: params = $page.params.ebd?.split("/") || [];
Expand Down

0 comments on commit 1f0d5ec

Please sign in to comment.