Separate parser from init so it can be loaded separate

e.g. for unit tests

Change-Id: I711427721915193e070e1590ab1afc07425840a9
This commit is contained in:
Ed Sanders 2019-10-23 13:44:49 +01:00
parent 97ce480767
commit 396b76dc14
2 changed files with 12 additions and 5 deletions

View file

@ -19,9 +19,8 @@
"remoteExtPath": "DiscussionTools/modules"
},
"ResourceModules": {
"ext.discussionTools.init": {
"ext.discussionTools.parser": {
"packageFiles": [
"dt.init.js",
"parser.js",
"lib/moment-timezone/moment-timezone-with-data-1970-2030.js",
{
@ -33,8 +32,16 @@
"moment",
"mediawiki.util",
"mediawiki.Uri",
"mediawiki.Title",
"mediawiki.api"
"mediawiki.Title"
]
},
"ext.discussionTools.init": {
"packageFiles": [
"dt.init.js"
],
"dependencies": [
"mediawiki.api",
"ext.discussionTools.parser"
]
}
},

View file

@ -8,7 +8,7 @@ var comments, threads,
mw.dt = {
init: {},
ui: {},
parser: require( './parser.js' )
parser: require( 'ext.discussionTools.parser' )
};
function setupComment( comment ) {