jenkins-bot has submitted this change and it was merged.

Change subject: Create boilerplate extension for side-by-side edit merge screen
......................................................................


Create boilerplate extension for side-by-side edit merge screen

Bug: T145411
Change-Id: I48d73cac96d469f5b82b5a7df8bd171cfe7252b8
---
A .gitignore
A .jscsrc
A .jshintignore
A .jshintrc
A Gruntfile.js
A README.md
A TwoColConflict.hooks.php
A TwoColConflict.php
A composer.json
A extension.json
A i18n/en.json
A i18n/qqq.json
A modules/ext.TwoColConflict.css
A modules/ext.TwoColConflict.init.js
A modules/ext.TwoColConflict.js
A package.json
A phpcs.xml
17 files changed, 210 insertions(+), 0 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..51d4694
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+.*.swp
+*~
+/.project
+/.idea
+/composer.lock
+/vendor
+/node_modules
diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 0000000..04baa68
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,4 @@
+{
+       "preset": "wikimedia",
+       "excludeFiles": [ "node_modules/**", "vendor/**" ]
+}
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 0000000..82eaa05
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,2 @@
+node_modules/**
+vendor/**
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..d43c482
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,20 @@
+{
+       // Enforcing
+       "bitwise": true,
+       "eqeqeq": true,
+       "es3": true,
+       "latedef": true,
+       "noarg": true,
+       "nonew": true,
+       "undef": true,
+       "unused": true,
+       "strict": false,
+
+       // Environment
+       "browser": true,
+
+       "globals": {
+               "mw": false,
+               "$": false
+       }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..36b41e8
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,35 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+       grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+       grunt.loadNpmTasks( 'grunt-jsonlint' );
+       grunt.loadNpmTasks( 'grunt-banana-checker' );
+       grunt.loadNpmTasks( 'grunt-jscs' );
+
+       grunt.initConfig( {
+               jshint: {
+                       options: {
+                               jshintrc: true
+                       },
+                       all: [
+                               '*.js',
+                               'modules/**/*.js'
+                       ]
+               },
+               jscs: {
+                       src: '<%= jshint.all %>'
+               },
+               banana: {
+                       all: 'i18n/'
+               },
+               jsonlint: {
+                       all: [
+                               '**/*.json',
+                               '!node_modules/**',
+                               '!vendor/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..33610e2
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+This extension provides a side-by-side edit merge screen for edit conflict 
resolution
diff --git a/TwoColConflict.hooks.php b/TwoColConflict.hooks.php
new file mode 100644
index 0000000..a7a5bfb
--- /dev/null
+++ b/TwoColConflict.hooks.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Hooks for TwoColConflict extension
+ *
+ * @file
+ * @ingroup Extensions
+ * @license GPL-2.0+
+ */
+
+class TwoColConflictHooks {
+       public static function onBeforePageDisplay( OutputPage $out, Skin $skin 
) {
+       }
+}
diff --git a/TwoColConflict.php b/TwoColConflict.php
new file mode 100644
index 0000000..f12c780
--- /dev/null
+++ b/TwoColConflict.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * TwoColConflict MediaWiki Extension
+ */
+
+if ( function_exists( 'wfLoadExtension' ) ) {
+       wfLoadExtension( 'TwoColConflict' );
+       // Keep i18n globals so mergeMessageFileList.php doesn't break
+       $wgMessagesDirs['TwoColConflict'] = __DIR__ . '/i18n';
+       wfWarn(
+               'Deprecated PHP entry point used for TwoColConflict extension. 
Please use wfLoadExtension ' .
+               'instead, see 
https://www.mediawiki.org/wiki/Extension_registration for more details.'
+       );
+       return true;
+} else {
+       die( 'This version of the TwoColConflict extension requires MediaWiki 
1.25+' );
+}
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..98d41d9
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,13 @@
+{
+       "require-dev": {
+               "jakub-onderka/php-parallel-lint": "0.9.2",
+               "mediawiki/mediawiki-codesniffer": "0.7.2"
+       },
+       "scripts": {
+               "fix": "phpcbf",
+               "test": [
+                       "parallel-lint . --exclude vendor",
+                       "phpcs -p -s"
+               ]
+       }
+}
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..7323209
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,42 @@
+{
+       "name": "TwoColConflict",
+       "version": "0.0.1",
+       "author": [
+               "WMDE"
+       ],
+       "url": "https://phabricator.wikimedia.org/T143823";,
+       "descriptionmsg": "twoColConflict-desc",
+       "license-name": "GPL-2.0+",
+       "type": "other",
+       "manifest_version": 1,
+       "AutoloadClasses": {
+               "TwoColConflictHooks": "TwoColConflict.hooks.php"
+       },
+       "Hooks": {
+               "BeforePageDisplay": [
+                       "TwoColConflictHooks::onBeforePageDisplay"
+               ]
+       },
+       "MessagesDirs": {
+               "TwoColConflict": [
+                       "i18n"
+               ]
+       },
+       "ResourceModules": {
+               "ext.TwoColConflict.init": {
+                       "scripts": [
+                               "modules/ext.TwoColConflict.js",
+                               "modules/ext.TwoColConflict.init.js"
+                       ],
+                       "styles": [
+                               "modules/ext.TwoColConflict.css"
+                       ],
+                       "messages": [],
+                       "dependencies": []
+               }
+       },
+       "ResourceFileModulePaths": {
+               "localBasePath": "",
+               "remoteExtPath": "TwoColConflict"
+       }
+}
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..7df8f15
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "WMDE"
+               ]
+       },
+       "twoColConflict": "TwoColConflict",
+       "twoColConflict-desc": "This is an extension for showing a side-by-side 
edit merge screen for edit conflict resolution"
+}
\ No newline at end of file
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 0000000..6a39b65
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "WMDE"
+               ]
+       },
+       "twoColConflict": "TwoColConflict",
+       "twoColConflict-desc": "{{desc|name=TwoColConflict|url=}}"
+}
\ No newline at end of file
diff --git a/modules/ext.TwoColConflict.css b/modules/ext.TwoColConflict.css
new file mode 100644
index 0000000..6d7cefb
--- /dev/null
+++ b/modules/ext.TwoColConflict.css
@@ -0,0 +1,3 @@
+.mw-twocolconflict-foo {
+       float: left;
+}
diff --git a/modules/ext.TwoColConflict.init.js 
b/modules/ext.TwoColConflict.init.js
new file mode 100644
index 0000000..a18ebbb
--- /dev/null
+++ b/modules/ext.TwoColConflict.init.js
@@ -0,0 +1,3 @@
+( function () {
+
+}() );
diff --git a/modules/ext.TwoColConflict.js b/modules/ext.TwoColConflict.js
new file mode 100644
index 0000000..88f5f87
--- /dev/null
+++ b/modules/ext.TwoColConflict.js
@@ -0,0 +1,10 @@
+( function () {
+
+       /**
+        * @class mw.twoColConflict
+        * @singleton
+        */
+       mw.twoColConflict = {
+       };
+
+}() );
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..d6d0f28
--- /dev/null
+++ b/package.json
@@ -0,0 +1,14 @@
+{
+  "private": true,
+  "scripts": {
+    "test": "grunt test"
+  },
+  "devDependencies": {
+    "grunt": "0.4.5",
+    "grunt-cli": "0.1.13",
+    "grunt-contrib-jshint": "0.11.3",
+    "grunt-banana-checker": "0.4.0",
+    "grunt-jscs": "2.5.0",
+    "grunt-jsonlint": "1.0.7"
+  }
+}
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 0000000..d81a292
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<ruleset>
+       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+       <file>.</file>
+       <arg name="extensions" value="php,php5,inc"/>
+       <arg name="encoding" value="utf8"/>
+       <exclude-pattern>vendor</exclude-pattern>
+</ruleset>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48d73cac96d469f5b82b5a7df8bd171cfe7252b8
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/2ColConflict
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: WMDE-Fisch <christoph.fisc...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to