2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-11 18:02:28 +03:00

Move htmllint to npm script.

This commit is contained in:
Bardi Harborow
2017-01-23 20:38:34 +11:00
parent 563926717c
commit c5a9ebf576
3 changed files with 24 additions and 22 deletions
+4 -21
View File
@@ -162,26 +162,6 @@ module.exports = function (grunt) {
}
},
htmllint: {
options: {
ignore: [
'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime”, “datetime-local”, “email”, “hidden”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.',
'Attribute “autocomplete” not allowed on element “button” 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).',
'Element “div” not allowed as child of element “progress” in this context. (Suppressing further errors from this subtree.)',
'Element “img” is missing required attribute “src”.',
'The “color” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “date” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “datetime” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “datetime-local” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “month” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “time” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
'The “week” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.'
]
},
src: ['_gh_pages/**/*.html', 'js/tests/visual/*.html']
},
watch: {
src: {
files: '<%= concat.bootstrap.src %>',
@@ -226,6 +206,9 @@ module.exports = function (grunt) {
htmlhint: {
command: 'npm run htmlhint'
},
htmllint: {
command: 'npm run htmllint'
},
sass: {
command: 'npm run sass'
},
@@ -288,7 +271,7 @@ module.exports = function (grunt) {
require('time-grunt')(grunt)
// Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll:docs', 'htmllint', 'exec:htmlhint'])
grunt.registerTask('validate-html', ['jekyll:docs', 'exec:htmllint', 'exec:htmlhint'])
var runSubset = function (subset) {
return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset