diff --git a/.gitignore b/.gitignore index af93b59..aa2ec14 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ alltube-*.zip coverage/ bower_components/ config.yml +doc/ diff --git a/Gruntfile.js b/Gruntfile.js index 292c56d..b5224db 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -70,6 +70,14 @@ module.exports = function (grunt) { }, src: ['*.php', '!config.yml', 'dist/**', 'fonts/**', '.htaccess', 'img/**', 'js/**', 'LICENSE', 'README.md', 'robots.txt', 'sitemap.xml', 'templates/**', 'templates_c/', 'vendor/**', 'classes/**', 'controllers/**', 'bower_components/**', '!vendor/ffmpeg/**', '!vendor/bin/ffmpeg'] } + }, + phpdocumentor: { + doc: { + options: { + target: 'doc/', + directory: 'classes/,controllers/,tests/' + } + } } } ); @@ -82,9 +90,11 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-phpunit'); grunt.loadNpmTasks('grunt-contrib-compress'); grunt.loadNpmTasks('grunt-jslint'); + grunt.loadNpmTasks('grunt-phpdocumentor'); grunt.registerTask('default', ['uglify', 'cssmin']); grunt.registerTask('lint', ['phpcs', 'jslint']); grunt.registerTask('test', ['phpunit']); + grunt.registerTask('doc', ['phpdocumentor']); grunt.registerTask('release', ['default', 'githash', 'compress']); }; diff --git a/package.json b/package.json index 88d5516..8c9f981 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "grunt-phpunit": "~0.3.6", "grunt-contrib-compress": "~1.3.0", "grunt-githash": "~0.1.3", - "grunt-jslint": "~1.1.14" + "grunt-jslint": "~1.1.14", + "grunt-phpdocumentor": "~0.4.1" }, "repository": { "type": "git",