mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-13 17:27:42 +00:00
c9b4aa65fd
This patch makes initialization easier and cheaper. Since only the PhpTags extension uses the CodeMirrorGetAdditionalResources hook it was removed. Instead, the CodeMirrorPluginModules and CodeMirrorTagModes properties are used in extension.json file. This patch adds ext.CodeMirror.lib.mode.php module for the PhpTags extension (with dependences). In CodeMirror there are a lot of modes they will be registered on request (if they will be requered for extensions). Examples of integration: * Cite: I1bf156fa813af4d5f891619f692047bbdb8a1a86 * PhpTags: Ie339f0475e63885e603defaee2cdcccd6a95fafc Bug: T163238 Change-Id: Idb7a1a5769a1047ef2f7cd25a7152f73a6613225
126 lines
2.9 KiB
JSON
126 lines
2.9 KiB
JSON
{
|
|
"name": "CodeMirror",
|
|
"version": "4.0.0",
|
|
"author": [
|
|
"[https://www.mediawiki.org/wiki/User:Pastakhov Pavel Astakhov]",
|
|
"[https://www.mediawiki.org/wiki/User:Florianschmidtwelzow Florian Schmidt]"
|
|
],
|
|
"url": "https://www.mediawiki.org/wiki/Extension:CodeMirror",
|
|
"descriptionmsg": "codemirror-desc",
|
|
"type": "parserhook",
|
|
"license-name": "GPL-2.0+",
|
|
"MessagesDirs": {
|
|
"CodeMirror": [
|
|
"i18n"
|
|
]
|
|
},
|
|
"AutoloadClasses": {
|
|
"CodeMirrorHooks": "CodeMirror.hooks.php"
|
|
},
|
|
"ResourceModules": {
|
|
"ext.CodeMirror.loader": {
|
|
"loaderScripts": "ext.CodeMirror.loader.js"
|
|
},
|
|
"ext.CodeMirror": {
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib",
|
|
"ext.CodeMirror.mode.mediawiki",
|
|
"jquery.textSelection",
|
|
"mediawiki.api",
|
|
"mediawiki.api.options",
|
|
"user.options"
|
|
],
|
|
"scripts": [
|
|
"ext.CodeMirror.js"
|
|
],
|
|
"styles": [
|
|
"ext.CodeMirror.less"
|
|
],
|
|
"messages": [
|
|
"codemirror-enable-label",
|
|
"codemirror-disable-label"
|
|
]
|
|
},
|
|
"ext.CodeMirror.lib": {
|
|
"scripts": [
|
|
"lib/codemirror/lib/codemirror.js"
|
|
],
|
|
"styles": [
|
|
"lib/codemirror/lib/codemirror.css"
|
|
]
|
|
},
|
|
"ext.CodeMirror.mode.mediawiki": {
|
|
"scripts": "mode/mediawiki/mediawiki.js",
|
|
"styles": "mode/mediawiki/mediawiki.css",
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib"
|
|
]
|
|
},
|
|
"ext.CodeMirror.lib.mode.css": {
|
|
"scripts": "lib/codemirror/mode/css/css.js",
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib"
|
|
]
|
|
},
|
|
"ext.CodeMirror.lib.mode.javascript": {
|
|
"scripts": "lib/codemirror/mode/javascript/javascript.js",
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib"
|
|
]
|
|
},
|
|
"ext.CodeMirror.lib.mode.xml": {
|
|
"scripts": "lib/codemirror/mode/xml/xml.js",
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib"
|
|
]
|
|
},
|
|
"ext.CodeMirror.lib.mode.htmlmixed": {
|
|
"scripts": "lib/codemirror/mode/htmlmixed/htmlmixed.js",
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib.mode.xml",
|
|
"ext.CodeMirror.lib.mode.javascript",
|
|
"ext.CodeMirror.lib.mode.css",
|
|
"ext.CodeMirror.lib"
|
|
]
|
|
},
|
|
"ext.CodeMirror.lib.mode.clike": {
|
|
"scripts": "lib/codemirror/mode/clike/clike.js",
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib"
|
|
]
|
|
},
|
|
"ext.CodeMirror.lib.mode.php": {
|
|
"scripts": "lib/codemirror/mode/php/php.js",
|
|
"dependencies": [
|
|
"ext.CodeMirror.lib.mode.htmlmixed",
|
|
"ext.CodeMirror.lib.mode.clike",
|
|
"ext.CodeMirror.lib"
|
|
]
|
|
}
|
|
},
|
|
"ResourceFileModulePaths": {
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "CodeMirror/resources"
|
|
},
|
|
"Hooks": {
|
|
"MakeGlobalVariablesScript": [
|
|
"CodeMirrorHooks::onMakeGlobalVariablesScript"
|
|
],
|
|
"BeforePageDisplay": [
|
|
"CodeMirrorHooks::onBeforePageDisplay"
|
|
],
|
|
"GetPreferences": [
|
|
"CodeMirrorHooks::onGetPreferences"
|
|
]
|
|
},
|
|
"config": {
|
|
"CodeMirrorEnableFrontend": true
|
|
},
|
|
"CodeMirrorTagModes": {
|
|
"pre": "mw-tag-pre",
|
|
"nowiki": "mw-tag-nowiki"
|
|
},
|
|
"CodeMirrorPluginModules": [],
|
|
"manifest_version": 1
|
|
}
|