Browse Source

Switch to "grunt-html" for validating docs.

It requires Java installed, but it's faster.
pull/684/merge
XhmikosR 10 years ago
parent
commit
c603c413d1
  1. 18
      Gruntfile.js
  2. 2
      package.json

18
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']);

2
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",

Loading…
Cancel
Save