From eb782a627788b8c200213a8f6b0da801f6e1c9ca Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 13 Apr 2015 00:52:37 +0200 Subject: [PATCH] Grunt task for phpcs --- Gruntfile.js | 13 +++++++++++++ package.json | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 4671cda..7833da4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,12 +25,25 @@ module.exports = function (grunt) { files: ['css/*.css'], tasks: ['cssmin'] } + }, + phpcs: { + php: { + src: ['*.php'] + }, + js: { + src: ['js/*.js'] + }, + Gruntfile: { + src: ['Gruntfile.js'] + } } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-phpcs'); grunt.registerTask('default', ['uglify', 'cssmin']); + grunt.registerTask('lint', ['phpcs']); }; diff --git a/package.json b/package.json index f97e8c1..dfffadf 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "grunt-cli": "~0.1.13", "grunt-contrib-cssmin": "~0.10.0", "grunt-contrib-uglify": "~0.6.0", - "grunt-contrib-watch": "~0.6.1" + "grunt-contrib-watch": "~0.6.1", + "grunt-phpcs": "~0.4.0" }, "repository": { "type": "git",