mediawiki-extensions-Gadgets/includes/content
Siddharth VP 1f7b9d90df Support JSON files in gadgets
The parsed content of JSON files in the gadget is made available from the
gadget's JS files via require(). That is, MediaWiki:Gadget-data.json (or
Gadget:data.json) is available as `require('./data.json')`. This is
supported for both MediaWikiGadgetsDefinitionRepo and
GadgetDefinitionNamespaceRepo. The JSON parsing is done server-side.

JSON can only be used in "package" gadgets - in which the JS files can
also be invoked via require().

Also added a test for GadgetResourceLoaderModule.

Bug: T198758
Depends-On: Ib4556d09c4d393269e32771aab00f59a5f630e1b
Depends-On: Id4589a597ccfc4266b3e63d10f75b146aa7a287a
Change-Id: I21acb46cdd244a39b5cc6963aa763f0113bd1e38
2021-12-27 17:33:21 +00:00
..
GadgetDefinitionContent.php Override ContentHandler::fillParserOutput instead of Content::fillParserOutput. 2021-10-07 13:09:05 +03:00
GadgetDefinitionContentHandler.php Support JSON files in gadgets 2021-12-27 17:33:21 +00:00
GadgetDefinitionDeletionUpdate.php Avoid hardcoding specific GadgetRepo implementations for cache invalidations 2017-11-07 12:13:11 -08:00
GadgetDefinitionSecondaryDataUpdate.php Avoid hardcoding specific GadgetRepo implementations for cache invalidations 2017-11-07 12:13:11 -08:00
GadgetDefinitionValidator.php Support JSON files in gadgets 2021-12-27 17:33:21 +00:00
schema.json Support JSON files in gadgets 2021-12-27 17:33:21 +00:00