Skip to content

Commit

Permalink
feat: externalize static assets
Browse files Browse the repository at this point in the history
So the repo. can be cloned quicker.
Should remove old assets from
git history, too (heavy base64 bitmaps are
embedded in SVG).
  • Loading branch information
JulianCataldo committed Mar 22, 2023
1 parent 48c7de9 commit 84e775d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 80 deletions.
14 changes: 0 additions & 14 deletions public/images/illustrations/404.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/images/illustrations/500.svg

This file was deleted.

14 changes: 0 additions & 14 deletions public/images/illustrations/maintenance.svg

This file was deleted.

50 changes: 0 additions & 50 deletions public/images/logo.svg

This file was deleted.

Binary file removed public/images/users/bonnie-green.png
Binary file not shown.
7 changes: 6 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { API_URL } from './consts.js';
import { API_URL, STATIC_BASE_URL } from './consts.js';
import type { Endpoint, EndpointsToOperations } from './types.js';

export async function fetchData<Selected extends Endpoint>(endpoint: Selected) {
Expand All @@ -13,3 +13,8 @@ export async function fetchData<Selected extends Endpoint>(endpoint: Selected) {
export function url(path: string) {
return `${import.meta.env.SITE}${import.meta.env.BASE_URL}/${path}`;
}

// TODO: Remove old assets from git history (to keep it snappy for Containers).
export function asset(path: string) {
return `${STATIC_BASE_URL}/${path}`;
}

0 comments on commit 84e775d

Please sign in to comment.