Skip to content

pantoken / platforms/canvas-theme-editor/src / CdnProvider

介面: CdnProvider

Alpha(內測)

可提供 npm 套件檔案的 CDN。提供者永遠不會硬編碼套件名稱——他們只知道如何從一個 CdnFile 組成 URL。

屬性

id

id: string

Alpha(內測)

穩定的識別符,例如 "jsdelivr"


label

label: string

Alpha(內測)

可供人閱讀的名稱,例如 "jsDelivr"


supportsCombine

supportsCombine: boolean

Alpha(內測)

是否已實作 CdnProvider.buildCombineUrl

方法

buildUrl()

buildUrl(file, options?): string

Alpha(內測)

為單一檔案建立 URL。

參數

file

CdnFile

options?

CdnBuildOptions

回傳

string


buildCombineUrl()?

optional buildCombineUrl(files, options?): string

Alpha(內測)

建立一個同時提供多個檔案(串接在一起)的 URL。僅當 supportsCombine 時才需要。

參數

files

CdnFile[]

options?

CdnBuildOptions

回傳

string