Initial
This commit is contained in:
commit
0de7409a5a
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.idea
|
||||
node_modules
|
11
RequireJSHooks.php
Normal file
11
RequireJSHooks.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
class RequireJSHooks {
|
||||
|
||||
public static function onBeforePageDisplay(outputPage &$out, Skin &$skin){
|
||||
// $out->addModules("ext.RequireJS");
|
||||
$script = '<script type="text/javascript" src="/extensions/RequireJS/assets/js/require.js"></script>';
|
||||
$out->addHeadItem("modRequireJS_main", $script);
|
||||
return true;
|
||||
}
|
||||
}
|
5
assets/js/require.js
Normal file
5
assets/js/require.js
Normal file
File diff suppressed because one or more lines are too long
35
extension.json
Normal file
35
extension.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "RequireJS",
|
||||
"version": "0.1.0",
|
||||
"author": [
|
||||
"Stuzer05"
|
||||
],
|
||||
"url": "https://gitea.stuzer.link/stuzer05/mediawiki-extensions-requirejs",
|
||||
"description": "RequireJS for MediaWiki",
|
||||
"license-name": "",
|
||||
"type": "other",
|
||||
"requires": {
|
||||
"MediaWiki": ">= 1.35.0"
|
||||
},
|
||||
"Hooks": {
|
||||
"BeforePageDisplay": [
|
||||
"RequireJSHooks::onBeforePageDisplay"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"RequireJSHooks": "RequireJSHooks.php"
|
||||
},
|
||||
"ResourceModules": {
|
||||
"ext.RequireJS": {
|
||||
"packageFiles": [
|
||||
"assets/js/require.js"
|
||||
],
|
||||
"position": "top"
|
||||
}
|
||||
},
|
||||
"ResourceFileModulePaths": {
|
||||
"localBasePath": "",
|
||||
"remoteExtPath": "RequireJS"
|
||||
},
|
||||
"manifest_version": 1
|
||||
}
|
11
package-lock.json
generated
Normal file
11
package-lock.json
generated
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"monaco-editor": {
|
||||
"version": "0.20.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.20.0.tgz",
|
||||
"integrity": "sha512-hkvf4EtPJRMQlPC3UbMoRs0vTAFAYdzFQ+gpMb8A+9znae1c43q8Mab9iVsgTcg/4PNiLGGn3SlDIa8uvK1FIQ=="
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user