Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal committed Oct 24, 2024
1 parent 7e433d6 commit e6f1853
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions web/src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import overpass from '$lib/assets/fonts/overpass/Overpass.ttf?url';
import overpassMono from '$lib/assets/fonts/overpass/OverpassMono.ttf?url';
import { transpileFile } from '$lib/utils';
import fouc from '$lib/utils/fouc?raw';
import { transpileFile } from '$lib/utils/app-utils';
import fouc from '$lib/utils/app?raw';
import theme from '$lib/utils/theme?raw';
import type { Handle } from '@sveltejs/kit';

Expand Down
8 changes: 0 additions & 8 deletions web/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { mdiCogRefreshOutline, mdiDatabaseRefreshOutline, mdiHeadSyncOutline, md
import { sortBy } from 'lodash-es';
import { init, register, t } from 'svelte-i18n';
import { derived, get } from 'svelte/store';
import { ModuleKind, transpileModule } from 'typescript';

interface DownloadRequestOptions<T = unknown> {
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
Expand Down Expand Up @@ -338,10 +337,3 @@ export const suggestDuplicateByFileSize = (assets: AssetResponseDto[]): AssetRes

// eslint-disable-next-line unicorn/prefer-code-point
export const decodeBase64 = (data: string) => Uint8Array.from(atob(data), (c) => c.charCodeAt(0));

export const transpileFile = (content: string) => {
const result = transpileModule(content, {
compilerOptions: { module: ModuleKind.ES2020, removeComments: true },
});
return result.outputText;
};
8 changes: 8 additions & 0 deletions web/src/lib/utils/app-utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ModuleKind, transpileModule } from 'typescript';

export const transpileFile = (content: string) => {
const result = transpileModule(content, {
compilerOptions: { module: ModuleKind.ES2020, removeComments: true },
});
return result.outputText;
};
File renamed without changes.

0 comments on commit e6f1853

Please sign in to comment.