Browse Source

import HTML5 validation task from Bootstrap; fixes #282

pull/291/head
Chris Rebert 11 years ago
parent
commit
06d1c5d459
  1. 4
      .gitignore
  2. 21
      Gruntfile.js
  3. 1
      package.json

4
.gitignore vendored

@ -32,3 +32,7 @@ nbproject
.idea
node_modules
_site
# grunt-html-validation
validation-report.json
validation-status.json

21
Gruntfile.js

@ -118,6 +118,26 @@ module.exports = function(grunt) {
],
tasks: ['sass']
}
},
jekyll: {
docs: {}
},
validation: {
options: {
charset: 'utf-8',
doctype: 'HTML5',
failHard: true,
reset: true,
relaxerror: [
'Bad value apple-mobile-web-app-title for attribute name on element meta: Keyword apple-mobile-web-app-title is not registered.',
'Attribute ontouchstart not allowed on element body at this point.'
]
},
files: {
src: '_site/**/*.html'
}
}
});
@ -129,6 +149,7 @@ module.exports = function(grunt) {
grunt.registerTask('dist-css', ['sass', 'cssmin']);
grunt.registerTask('dist-js', ['concat', 'uglify']);
grunt.registerTask('dist', ['dist-css', 'dist-js', 'banner', 'copy']);
grunt.registerTask('validate-html', ['jekyll', 'validation']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('build', ['dist']);
};

1
package.json

@ -37,6 +37,7 @@
"grunt-contrib-sass": "~0.7.1",
"grunt-contrib-uglify": "~0.3.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-html-validation": "~0.1.13",
"grunt-jekyll": "~0.4.1",
"load-grunt-tasks": "~0.4.0"
}

Loading…
Cancel
Save