Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorBardi Harborow <bardi@bardiharborow.com>2017-09-27 17:41:58 +0300
committerXhmikosR <xhmikosr@gmail.com>2017-10-08 19:08:16 +0300
commit258507b756075ded64bc13ac6deb92e5dcebb7e5 (patch)
tree1c26672f37af445ab7cd5f01d71892853a75c64d /build
parent5e7a9afe35c2685d88bdb4a94c6718ac758f79b0 (diff)
Move from htmllint to Travis-only vnu.jar.
Diffstat (limited to 'build')
-rw-r--r--build/.htmllintrc19
-rw-r--r--build/htmllint.js23
2 files changed, 23 insertions, 19 deletions
diff --git a/build/.htmllintrc b/build/.htmllintrc
deleted file mode 100644
index c04658fb9e..0000000000
--- a/build/.htmllintrc
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "attr-bans": ["align", "background", "bgcolor", "border", "frameborder", "longdesc", "marginwidth", "marginheight", "scrolling"],
- "attr-name-style": false,
- "attr-no-unsafe-char": false,
- "class-style": "dash",
- "doctype-first": true,
- "doctype-html5": true,
- "fig-req-figcaption": false,
- "html-valid-content-model": false,
- "id-class-ignore-regex": "(onclick|content|[a-z]+([A-Z][a-z])+)",
- "id-class-style": "dash",
- "img-req-src": false,
- "img-req-alt": false,
- "indent-style": "spaces",
- "indent-width": 2,
- "spec-char-escape": false,
- "tag-bans": ["b", "i"],
- "title-max-len": false
-}
diff --git a/build/htmllint.js b/build/htmllint.js
new file mode 100644
index 0000000000..a40ff922ae
--- /dev/null
+++ b/build/htmllint.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const childProcess = require('child_process')
+const fs = require('fs')
+
+if (fs.existsSync('vnu.jar')) {
+ childProcess.exec('java -version', function (error) {
+ if (error) {
+ console.error('skipping HTML lint test. java missing.')
+ return
+ }
+
+ const vnu = childProcess.spawn(
+ 'java',
+ ['-jar', 'vnu.jar', '--skip-non-html', '_gh_pages/'],
+ { stdio: 'inherit' }
+ )
+
+ vnu.on('exit', process.exit)
+ })
+} else {
+ console.error('skipping HTML lint test. vnu.jar missing.')
+}