Manual:$wgResourceModules

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgResourceModules and the translation is 60% complete.
Other languages:
English • ‎français • ‎polski • ‎日本語
ResourceLoader: $wgResourceModules
Array of all extra defined modules that can later be loaded during the output.
導入されたバージョン:1.17.0 (r72349)
除去されたバージョン:使用中
許容される値:(多次元配列)
既定値:[]

Below is an example of how to use this in an extension.You would put this in your extension.json file.

"ResourceModules": {
    "ext.MyExtension": {
        "localBasePath": "modules/ext.MyExtension",
        "remoteExtPath": "MyExtension/modules/ext.MyExtension"
        "styles": [
            "foo.css",
            "bar.css"
        ],
        "packageFiles": [
            "index.js",
            "foo.js"
        ]
        "messages": [
            "myextension-foo-label"
        ],
        "dependencies": [
            "jquery.cookie",
            "mediawiki.util"
        ]
    }
}

オプション

See $wgResourceModules.

モジュールの読み込み

ResourceLoader/Migration guide (developers)#Adding a module to the page を参照してください:

関連項目