Commit ee4176c9 authored by XhmikosR's avatar XhmikosR
Browse files

Move vnu-jar to devDependencies and remove completely htmlhint.

parent 258507b7
Showing with 46 additions and 548 deletions
+46 -548
...@@ -11,7 +11,6 @@ before_install: ...@@ -11,7 +11,6 @@ before_install:
install: install:
- bundle install --deployment --jobs=3 --retry=3 - bundle install --deployment --jobs=3 --retry=3
- npm install - npm install
- curl -L https://github.com/validator/validator/releases/download/17.9.0/vnu.jar_17.9.0.zip | jar -x dist/vnu.jar && mv dist/vnu.jar vnu.jar
after_success: after_success:
- if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then npm run docs-upload-preview; fi - if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then npm run docs-upload-preview; fi
stages: stages:
......
#!/usr/bin/env node
/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017 The Bootstrap Authors
* Copyright 2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict' 'use strict'
const childProcess = require('child_process') const childProcess = require('child_process')
const fs = require('fs') const vnu = require('vnu-jar')
childProcess.exec('java -version', function (error) {
if (error) {
console.error('Skipping HTML lint test; Java is missing.')
return
}
if (fs.existsSync('vnu.jar')) { const ignores = [
childProcess.exec('java -version', function (error) { 'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime-local”, “email”, “hidden”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.',
if (error) { 'Attribute “autocomplete” not allowed on element “button” at this point.',
console.error('skipping HTML lint test. java missing.') 'Attribute “title” not allowed on element “circle” at this point.',
return 'Bad value “tablist” for attribute “role” on element “nav”.',
} 'Element “img” is missing required attribute “src”.',
'Element “legend” not allowed as child of element “div” in this context.*'
].join('|')
const vnu = childProcess.spawn( const args = [
'java', '-jar',
['-jar', 'vnu.jar', '--skip-non-html', '_gh_pages/'], vnu,
{ stdio: 'inherit' } '--asciiquotes',
) '--errors-only',
'--skip-non-html',
`--filterpattern "${ignores}"`,
'_gh_pages/',
'js/tests/'
]
vnu.on('exit', process.exit) return childProcess.spawn('java', args, {
shell: true,
stdio: 'inherit'
}) })
} else { .on('exit', process.exit)
console.error('skipping HTML lint test. vnu.jar missing.') })
}
This diff is collapsed.
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
"cross-env": "^5.0.5", "cross-env": "^5.0.5",
"eslint": "^4.2.0", "eslint": "^4.2.0",
"eslint-plugin-compat": "^1.0.4", "eslint-plugin-compat": "^1.0.4",
"htmllint-cli": "^0.0.6",
"jsunitsaucelabs": "^1.2.0", "jsunitsaucelabs": "^1.2.0",
"node-sass": "^4.5.3", "node-sass": "^4.5.3",
"nodemon": "^1.11.0", "nodemon": "^1.11.0",
...@@ -111,6 +110,7 @@ ...@@ -111,6 +110,7 @@
"stylelint-order": "^0.7.0", "stylelint-order": "^0.7.0",
"stylelint-scss": "^2.1.0", "stylelint-scss": "^2.1.0",
"uglify-js": "^3.0.24", "uglify-js": "^3.0.24",
"vnu-jar": "^17.11.1",
"workbox-build": "^2.0.1" "workbox-build": "^2.0.1"
}, },
"engines": { "engines": {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment