Adrian Lang has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/200860

Change subject: Move wikibase.view JS into subdirectory
......................................................................

Move wikibase.view JS into subdirectory

Most JavaScript modules that will reside in WikibaseView are not under
`wikibase.view`. They are not even all under `wikibase`.

This is a prerequisite for T93745.

Change-Id: I5983ef30da93d33759da9efbb07b2de6ea8cc2e8
---
M view/resources/resources.php
R view/resources/wikibase/view/ViewFactory.js
R view/resources/wikibase/view/namespace.js
A view/resources/wikibase/view/resources.php
4 files changed, 38 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/60/200860/1

diff --git a/view/resources/resources.php b/view/resources/resources.php
index edd593d..a86806c 100644
--- a/view/resources/resources.php
+++ b/view/resources/resources.php
@@ -5,32 +5,7 @@
  * @author Adrian Heine < adrian.he...@wikimedia.de >
  */
 return call_user_func( function() {
-       preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . 
'(?:vendor|extensions)'
-               . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, 
$remoteExtPath );
-
-       $moduleTemplate = array(
-               'localBasePath' => __DIR__,
-               'remoteExtPath' => '..' . $remoteExtPath[0]
+       return array_merge(
+               include ( __DIR__ . '/wikibase/view/resources.php' )
        );
-
-       $modules = array(
-               'wikibase.view.__namespace' => $moduleTemplate + array(
-                       'scripts' => array(
-                               'namespace.js'
-                       ),
-               ),
-               'wikibase.view.ViewFactory' => $moduleTemplate + array(
-                       'scripts' => array(
-                               'ViewFactory.js'
-                       ),
-                       'dependencies' => array(
-                               'jquery.wikibase.itemview',
-                               'jquery.wikibase.propertyview',
-                               'wikibase.view.__namespace',
-                               'wikibase.ValueViewBuilder'
-                       )
-               ),
-       );
-
-       return $modules;
 } );
diff --git a/view/resources/ViewFactory.js 
b/view/resources/wikibase/view/ViewFactory.js
similarity index 100%
rename from view/resources/ViewFactory.js
rename to view/resources/wikibase/view/ViewFactory.js
diff --git a/view/resources/namespace.js 
b/view/resources/wikibase/view/namespace.js
similarity index 100%
rename from view/resources/namespace.js
rename to view/resources/wikibase/view/namespace.js
diff --git a/view/resources/wikibase/view/resources.php 
b/view/resources/wikibase/view/resources.php
new file mode 100644
index 0000000..edd593d
--- /dev/null
+++ b/view/resources/wikibase/view/resources.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @license GNU GPL v2+
+ * @author Adrian Heine < adrian.he...@wikimedia.de >
+ */
+return call_user_func( function() {
+       preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . 
'(?:vendor|extensions)'
+               . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, 
$remoteExtPath );
+
+       $moduleTemplate = array(
+               'localBasePath' => __DIR__,
+               'remoteExtPath' => '..' . $remoteExtPath[0]
+       );
+
+       $modules = array(
+               'wikibase.view.__namespace' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'namespace.js'
+                       ),
+               ),
+               'wikibase.view.ViewFactory' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'ViewFactory.js'
+                       ),
+                       'dependencies' => array(
+                               'jquery.wikibase.itemview',
+                               'jquery.wikibase.propertyview',
+                               'wikibase.view.__namespace',
+                               'wikibase.ValueViewBuilder'
+                       )
+               ),
+       );
+
+       return $modules;
+} );

-- 
To view, visit https://gerrit.wikimedia.org/r/200860
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5983ef30da93d33759da9efbb07b2de6ea8cc2e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <adrian.he...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to