fix(ci): 누락 파일 추가 및 AssetManager 경로 전략 변경사항 포함
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import type { AssetManager } from '@/lib/assets/assetManager'
|
||||
|
||||
export type AssetsIndex = {
|
||||
images: string[]
|
||||
fonts: string[]
|
||||
other: string[]
|
||||
}
|
||||
|
||||
export function buildAssetsIndex(am: AssetManager): Uint8Array {
|
||||
const images: string[] = []
|
||||
const fonts: string[] = []
|
||||
const other: string[] = []
|
||||
for (const ref of am.list()) {
|
||||
if (ref.mimeType.startsWith('image/')) images.push(ref.path)
|
||||
else if (ref.mimeType.startsWith('font/')) fonts.push(ref.path)
|
||||
else other.push(ref.path)
|
||||
}
|
||||
const obj: AssetsIndex = { images, fonts, other }
|
||||
const json = JSON.stringify(obj, null, 2)
|
||||
return new TextEncoder().encode(json)
|
||||
}
|
||||
Reference in New Issue
Block a user