1
0
Fork 0
This repository has been archived on 2024-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
php-functions/Gruntfile.js

36 lines
858 B
JavaScript
Raw Normal View History

2016-02-05 11:47:37 +01:00
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('time-grunt')(grunt);
grunt.initConfig();
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
//
grunt.initConfig({
watch: {
options: {
atBegin: true,
},
php: {
files: ['functions.php'],
tasks: 'php',
}
},
exec: {
document: {
command: 'vendor/bin/phpdoc -d ./ -i /vendor/,/plugins/,node_modules/'
},
correct: {
command: 'vendor/bin/phpcbf --standard=PSR2 functions.php'
},
codesniffer: {
command: 'vendor/bin/phpcs --standard=PSR2 functions.php'
}
},
});
// the default task (running "grunt" in console) is "watch"
grunt.registerTask('default', ['watch']);
grunt.registerTask('php', ['exec:document', 'exec:correct', 'exec:codesniffer']);
};