Merge "[dev][Legacy][JS] Split Legacy mode JavaScript into new ResourceLoader module"

This commit is contained in:
jenkins-bot 2020-05-12 22:05:18 +00:00 committed by Gerrit Code Review
commit 4e661112e8
6 changed files with 25 additions and 5 deletions

View file

@ -84,7 +84,7 @@ class SkinVector extends SkinTemplate {
$module = $this->isLegacy()
? 'skins.vector.styles.legacy' : 'skins.vector.styles';
$modules['styles']['skin'][] = $module;
$modules['core'][] = 'skins.vector.js';
$modules['core'][] = $this->isLegacy() ? 'skins.vector.legacy.js' : 'skins.vector.js';
return $modules;
}

View file

@ -1,6 +1,6 @@
var
collapsibleTabs = require( './collapsibleTabs.js' ),
vector = require( './vector.js' );
collapsibleTabs = require( '../skins.vector.legacy.js/collapsibleTabs.js' ),
vector = require( '../skins.vector.legacy.js/vector.js' );
function main() {
collapsibleTabs.init();

View file

@ -0,0 +1,10 @@
var
collapsibleTabs = require( './collapsibleTabs.js' ),
vector = require( './vector.js' );
function main() {
collapsibleTabs.init();
$( vector.init );
}
main();

View file

@ -67,8 +67,18 @@
"skins.vector.js": {
"packageFiles": [
"resources/skins.vector.js/index.js",
"resources/skins.vector.js/collapsibleTabs.js",
"resources/skins.vector.js/vector.js"
"resources/skins.vector.legacy.js/collapsibleTabs.js",
"resources/skins.vector.legacy.js/vector.js"
],
"dependencies": [
"mediawiki.util"
]
},
"skins.vector.legacy.js": {
"packageFiles": [
"resources/skins.vector.legacy.js/index.js",
"resources/skins.vector.legacy.js/collapsibleTabs.js",
"resources/skins.vector.legacy.js/vector.js"
],
"dependencies": [
"mediawiki.util"