Grunt task for phpcs

This commit is contained in:
Pierre Rudloff 2015-04-13 00:52:37 +02:00
parent 7e0638815d
commit eb782a6277
2 changed files with 15 additions and 1 deletions

View File

@ -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']);
};

View File

@ -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",