Skip to content

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

Arayüz: CdnProvider ​

Alfa

npm paket dosyalarını sunabilecek bir CDN. Sağlayıcılar asla bir paket adını sabit kodlamaz — yalnızca bir CdnFile'den bir URL nasıl oluşturulacağını bilirler.

Özellikler ​

id ​

id: string

Alfa

Kararlı tanımlayıcı, örn. "jsdelivr".


label ​

label: string

Alfa

İnsan tarafından okunabilir isim, örn. "jsDelivr".


supportsCombine ​

supportsCombine: boolean

Alfa

CdnProvider.buildCombineUrl uygulanmış mı.

Metotlar ​

buildUrl() ​

buildUrl(file, options?): string

Alfa

Tek bir dosya için URL oluşturur.

Parametreler ​

file ​

CdnFile

options? ​

CdnBuildOptions

Döndürür ​

string


buildCombineUrl()? ​

optional buildCombineUrl(files, options?): string

Alfa

Birden çok dosyayı birleştirip sunan tek bir URL oluşturur. supportsCombine olduğunda gereklidir.

Parametreler ​

files ​

CdnFile[]

options? ​

CdnBuildOptions

Döndürür ​

string