EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/196252
Change subject: Use grunt instead of jshint directly in pre-commit and Makefile
......................................................................
Use grunt instead of jshint directly in pre-commit and Makefile
Change-Id: Id081ce456f0a3196c42cf53ea38bbb2e959cb740
---
M Makefile
M scripts/pre-commit
2 files changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/52/196252/1
diff --git a/Makefile b/Makefile
index 643aae8..a046a1c 100644
--- a/Makefile
+++ b/Makefile
@@ -48,17 +48,20 @@
###
# Lints
###
-lint: jshint phplint checkless messagecheck
+lint: grunt phplint checkless messagecheck
phplint:
@find ./ -type f -iname '*.php' -print0 | xargs -0 -P 12 -L 1 ${PHP} -l
nodecheck:
@which npm > /dev/null && npm install \
- || (echo "You need to install Node.JS! See http://nodejs.org/"
&& false)
+ || (echo "You need to install Node.JS and npm! See
http://nodejs.org/" && false)
-jshint: nodecheck
- @node_modules/.bin/jshint modules/* tests/qunit/* --config .jshintrc
+gruntcheck: nodecheck
+ @which grunt > /dev/null || sudo npm install -g grunt-cli
+
+grunt: gruntcheck
+ @grunt test
checkless:
@${PHP} ../../maintenance/checkLess.php
diff --git a/scripts/pre-commit b/scripts/pre-commit
index 109ce14..b5b8230 100755
--- a/scripts/pre-commit
+++ b/scripts/pre-commit
@@ -39,7 +39,7 @@
if file_changed_in_commit '\.js$'; then
if [ "$IGNORE_JSHINT" != "1" ]; then
- COMMANDS="jshint $COMMANDS"
+ COMMANDS="grunt $COMMANDS"
fi
fi
--
To view, visit https://gerrit.wikimedia.org/r/196252
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id081ce456f0a3196c42cf53ea38bbb2e959cb740
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits