mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 17:40:12 +00:00
Merge "[dev][Legacy][JS] Split Legacy mode JavaScript into new ResourceLoader module"
This commit is contained in:
commit
4e661112e8
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
10
resources/skins.vector.legacy.js/index.js
Normal file
10
resources/skins.vector.legacy.js/index.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
var
|
||||
collapsibleTabs = require( './collapsibleTabs.js' ),
|
||||
vector = require( './vector.js' );
|
||||
|
||||
function main() {
|
||||
collapsibleTabs.init();
|
||||
$( vector.init );
|
||||
}
|
||||
|
||||
main();
|
14
skin.json
14
skin.json
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue