From bb5be0a2f9b9ed789e79603c106e8d2c7cf62305 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 12 Aug 2013 15:01:06 -0700 Subject: add HTML5 validation of docs pages to the build --- Gruntfile.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index c15b4ad11..576c63741 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -102,6 +102,19 @@ module.exports = function(grunt) { } }, + jekyll: { + docs: {} + }, + + validation: { + options: { + reset: true, + }, + files: { + src: ["_gh_pages/**/*.html"] + } + }, + watch: { src: { files: '<%= jshint.src.src %>', @@ -127,12 +140,17 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-html-validation'); + grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('browserstack-runner'); + // Docs HTML validation task + grunt.registerTask('validate-docs', ['jekyll', 'validation']); + // Test task. - var testSubtasks = ['jshint', 'qunit']; + var testSubtasks = ['jshint', 'qunit', 'validate-docs']; // Only run BrowserStack tests under Travis if (process.env.TRAVIS) { // Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key -- cgit v1.2.3