build(grunt): Only lint changed PHP files

This commit is contained in:
Pierre Rudloff 2019-09-21 13:51:02 +02:00
parent 32ee7bd5bc
commit 295ae87cae
3 changed files with 35 additions and 1 deletions

View file

@ -142,9 +142,21 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-markdownlint');
grunt.loadNpmTasks('grunt-phpstan');
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-changed');
grunt.registerTask('default', ['cssmin', 'potomo', 'phpdocumentor']);
grunt.registerTask('lint', ['csslint', 'jslint', 'fixpack', 'jsonlint', 'markdownlint', 'phpcs', 'phpstan']);
grunt.registerTask(
'lint',
[
'csslint',
'jslint',
'fixpack',
'jsonlint',
'markdownlint',
'changed:phpcs',
'changed:phpstan'
]
);
grunt.registerTask('test', ['phpunit']);
grunt.registerTask('release', ['default', 'githash', 'compress']);
};