mirror of
https://github.com/immich-app/immich.git
synced 2025-02-11 01:18:24 -05:00
pr feedback
This commit is contained in:
parent
7e433d6194
commit
e6f18531eb
4 changed files with 10 additions and 10 deletions
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
@ -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
web/src/lib/utils/app-utils.ts
Normal file
8
web/src/lib/utils/app-utils.ts
Normal file
|
@ -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;
|
||||
};
|
Loading…
Add table
Reference in a new issue