registration: Fix types of ResourceModules properties
authorKunal Mehta <legoktm@gmail.com>
Fri, 29 May 2015 00:31:16 +0000 (17:31 -0700)
committerKunal Mehta <legoktm@gmail.com>
Fri, 29 May 2015 00:54:33 +0000 (17:54 -0700)
styles and scripts can both be strings, and that is treated as if that was
the first value in the array.

style can be used as an object, the filename is the key, and value can be an
object that states what media type the stylesheet is for. An example of this
can be seen in the MonoBook skin.

Change-Id: If7d3a220cdccbb1ce096d776592535fe5782a954

docs/extension.schema.json

index 34cfe2c..a2ff64e 100644 (file)
                                                        "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath"
                                                },
                                                "scripts": {
-                                                       "type": "array",
+                                                       "type": ["string", "array"],
                                                        "description": "Scripts to always include (array of file paths)",
                                                        "items": {
                                                                "type": "string"
                                                        }
                                                },
                                                "styles": {
-                                                       "type": "array",
+                                                       "type": ["string", "array", "object"],
                                                        "description": "Styles to always load",
                                                        "items": {
                                                                "type": "string"