Merge jquery.webfonts into ext.uls.webfonts.repository

The two modules are always loaded together and don't need
separate entry points.

Additionally, this makes the ext.uls.webfonts.fonts
just depend on the ext.uls.webfonts.repository module
and not do anything else, so remove it in favor of
referencing ext.uls.webfonts.repository directly where
needed.

Bug: T292042
Change-Id: I067b9eda923fcb0d5da0ed80030356f1f747259b
This commit is contained in:
DannyS712
2021-10-15 23:33:49 +00:00
committed by jenkins-bot
parent a01bf88f9e
commit e17f5c0b39
3 changed files with 6 additions and 19 deletions

View File

@@ -346,24 +346,20 @@
"jquery.client"
]
},
"ext.uls.webfonts.fonts": {
"dependencies": [
"jquery.webfonts",
"ext.uls.webfonts.repository"
]
},
"ext.uls.webfonts.mobile": {
"scripts": "js/ext.uls.webfonts.mobile.js",
"targets": [
"mobile"
],
"dependencies": [
"jquery.webfonts",
"ext.uls.webfonts.repository"
]
},
"ext.uls.webfonts.repository": {
"scripts": "js/ext.uls.webfonts.repository.js",
"scripts": [
"../lib/jquery.webfonts/src/jquery.webfonts.js",
"js/ext.uls.webfonts.repository.js"
],
"targets": [
"desktop",
"mobile"
@@ -418,15 +414,6 @@
"localBasePath": "lib",
"remoteExtPath": "UniversalLanguageSelector/lib"
},
"jquery.webfonts": {
"scripts": "jquery.webfonts/src/jquery.webfonts.js",
"targets": [
"desktop",
"mobile"
],
"localBasePath": "lib",
"remoteExtPath": "UniversalLanguageSelector/lib"
},
"rangy.core": {
"scripts": "rangy/rangy-core.js",
"localBasePath": "lib",

View File

@@ -122,7 +122,7 @@
*/
setupWebFonts: function () {
var d = $.Deferred();
mw.loader.using( [ 'ext.uls.webfonts.fonts' ] ).then( function () {
mw.loader.using( [ 'ext.uls.webfonts.repository' ] ).then( function () {
if ( this.isWebFontsEnabled ) {
mw.webfonts.setup();
}

View File

@@ -137,7 +137,7 @@
if ( mw.webfonts.preferences.isEnabled() ) {
// Queue to next idle period to optimize loading.
mw.requestIdleCallback( function () {
mw.loader.using( 'ext.uls.webfonts.fonts' ).then( mw.webfonts.setup );
mw.loader.using( 'ext.uls.webfonts.repository' ).then( mw.webfonts.setup );
} );
}
} );