Jhernandez has uploaded a new change for review.

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

Change subject: Tools: Run make jshint with grunt
......................................................................

Tools: Run make jshint with grunt

make jshint && make jshinttests now runs the respective grunt tasks
Equivalent to grunt jshint && grunt jshint:tests

Change-Id: Ifba729c8f94b57aea0423a78fba1fa2ef89105b3
---
M Gruntfile.js
M Makefile
2 files changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/24/173024/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 44682e1..cb1b80d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -21,7 +21,8 @@
                QUNIT_MODULE: ( process.env.QUNIT_MODULE && '&module=' + 
process.env.QUNIT_MODULE ) || '',
                files: {
                        js: 'javascripts/**/*.js',
-                       jsTests: 'tests/qunit/**/*.js'
+                       jsTests: 'tests/qunit/**/*.js',
+                       jsExternals: 'javascripts/externals/**/*.js'
                },
                svg2png: {
                        dist: {
@@ -32,13 +33,14 @@
                        options: {
                                jshintrc: true
                        },
-                       all: [
+                       tests: '<%= files.jsTests %>',
+                       sources: [
                                '<%= files.js %>',
-                               '!javascripts/externals/**/*.js'
+                               '!<%= files.jsExternals %>'
                        ]
                },
                jscs: {
-                       src: '<%= jshint.all %>'
+                       sources: '<%= jshint.sources %>'
                },
                qunit: {
                        all: {
diff --git a/Makefile b/Makefile
index f6daa73..0e55566 100644
--- a/Makefile
+++ b/Makefile
@@ -64,10 +64,10 @@
        @node_modules/.bin/jscs javascripts/* --config .jscsrc
 
 jshinttests: nodecheck                 ## Lint the QUnit tests
-       @node_modules/.bin/jshint tests/qunit/* --config .jshintrc
+       @grunt jshint:tests
 
-jshint: nodecheck jshinttests          ## Lint the JavaScript files
-       @node_modules/.bin/jshint javascripts/* --config .jshintrc
+jshint: nodecheck      ## Lint the JavaScript files
+       @grunt jshint
 
 dependencies: nodecheck kssnodecheck phpcheck remotes
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifba729c8f94b57aea0423a78fba1fa2ef89105b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <[email protected]>

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

Reply via email to