From c603c413d1e94310f3254203a4dea34c7ccf9950 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 3 Mar 2015 18:44:59 +0200 Subject: [PATCH] Switch to "grunt-html" for validating docs. It requires Java installed, but it's faster. --- Gruntfile.js | 18 ++++++------------ package.json | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8e1fffd..2c190f3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -298,20 +298,14 @@ module.exports = function (grunt) { } }, - validation: { + htmllint: { options: { - charset: 'utf-8', - doctype: 'HTML5', - failHard: true, - reset: true, - relaxerror: [ - 'Attribute ontouchstart not allowed on element body at this point.', - 'Consider using the h1 element as a top-level heading only \\(all h1 elements are treated as top-level headings by many screen readers and other tools\\)\\.' + ignore: [ + 'Attribute "ontouchstart" not allowed on element "body" at this point.', + 'Consider using the "h1" element as a top-level heading only (all "h1" elements are treated as top-level headings by many screen readers and other tools).' ] }, - files: { - src: '_site/**/*.html' - } + src: '_site/**/*.html' }, sed: { @@ -346,7 +340,7 @@ module.exports = function (grunt) { grunt.registerTask('dist-css', ['sass', 'autoprefixer', 'usebanner', 'csscomb', 'cssmin']); grunt.registerTask('dist-js', ['concat', 'uglify']); grunt.registerTask('dist', ['clean', 'dist-css', 'dist-js', 'copy', 'build-ratchicons-data']); - grunt.registerTask('validate-html', ['jekyll', 'validation']); + grunt.registerTask('validate-html', ['jekyll', 'htmllint']); grunt.registerTask('build', ['dist']); grunt.registerTask('default', ['dist']); grunt.registerTask('test', ['dist', 'csslint', 'jshint', 'jscs', 'validate-html']); diff --git a/package.json b/package.json index 45c7c1e..da0ff85 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "grunt-contrib-uglify": "~0.8.0", "grunt-contrib-watch": "~0.6.1", "grunt-csscomb": "~3.0.0", - "grunt-html-validation": "~0.1.18", + "grunt-html": "~3.0.0", "grunt-jekyll": "~0.4.2", "grunt-jscs": "~1.5.0", "grunt-sed": "~0.1.1",