Paladox has uploaded a new change for review.

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

Change subject: [examples] Update tests
......................................................................

[examples] Update tests

Add support for running the composer test and the npm test by adding:

composer.json ( Can be able to run php code sniffer in the future. )

Gruntfile.js for npm and package.json.

Change-Id: I6bd6771d5b6acd2a6252294c79cbbccfc36824a7
---
A .jshintignore
R .jshintrc
A Gruntfile.js
A composer.json
A package.json
5 files changed, 56 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/examples 
refs/changes/50/244750/1

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 0000000..9836c42
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,3 @@
+node_modules
+
+js/overthrow.js
diff --git a/Example/.jshintrc b/.jshintrc
similarity index 100%
rename from Example/.jshintrc
rename to .jshintrc
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..b8d31cf
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+       grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+       grunt.loadNpmTasks( 'grunt-jsonlint' );
+       grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+       grunt.initConfig( {
+               jshint: {
+                       options: {
+                               jshintrc: true
+                       },
+                       all: [
+                               '*.js'
+                       ]
+               },
+               banana: {
+                       all: '**/i18n/'
+               },
+               jsonlint: {
+                       all: [
+                               '*.json',
+                               '**/*.json',
+                               '!node_modules/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..3d55a97
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+       "require-dev": {
+               "jakub-onderka/php-parallel-lint": "0.9.*"
+       },
+       "scripts": {
+               "test": [
+                       "parallel-lint . --exclude vendor"
+               ]
+       }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..094b8ea
--- /dev/null
+++ b/package.json
@@ -0,0 +1,13 @@
+{
+  "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.2.2",
+    "grunt-jsonlint": "1.0.4"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bd6771d5b6acd2a6252294c79cbbccfc36824a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to