aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2013-08-12 15:01:06 -0700
committerChris Rebert <[email protected]>2013-08-12 17:49:01 -0700
commitbb5be0a2f9b9ed789e79603c106e8d2c7cf62305 (patch)
tree84f95ba32d0b99098f94aa7004b44ba5adaeb8cb
parent715e924217003446661ed0e6ff62a0a64ea8a510 (diff)
downloadbootstrap-bb5be0a2f9b9ed789e79603c106e8d2c7cf62305.tar.xz
bootstrap-bb5be0a2f9b9ed789e79603c106e8d2c7cf62305.zip
add HTML5 validation of docs pages to the build
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml1
-rw-r--r--Gruntfile.js20
-rw-r--r--package.json2
4 files changed, 25 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 0d74d48fe..5c7f05192 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,9 @@ nbproject
*.komodoproject
.komodotools
+# grunt-html-validation
+validation-staus.json
+
# Folders to ignore
.hg
.svn
diff --git a/.travis.yml b/.travis.yml
index 5ed6e43e6..9f2371887 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,7 @@ language: node_js
node_js:
- 0.8
before_script:
+ - gem install jekyll
- npm install -g grunt-cli
env:
global:
diff --git a/Gruntfile.js b/Gruntfile.js
index c15b4ad11..576c63741 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -102,6 +102,19 @@ module.exports = function(grunt) {
}
},
+ jekyll: {
+ docs: {}
+ },
+
+ validation: {
+ options: {
+ reset: true,
+ },
+ files: {
+ src: ["_gh_pages/**/*.html"]
+ }
+ },
+
watch: {
src: {
files: '<%= jshint.src.src %>',
@@ -127,12 +140,17 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-html-validation');
+ grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('browserstack-runner');
+ // Docs HTML validation task
+ grunt.registerTask('validate-docs', ['jekyll', 'validation']);
+
// Test task.
- var testSubtasks = ['jshint', 'qunit'];
+ var testSubtasks = ['jshint', 'qunit', 'validate-docs'];
// Only run BrowserStack tests under Travis
if (process.env.TRAVIS) {
// Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key
diff --git a/package.json b/package.json
index 5f1428316..efcc5af0c 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,8 @@
, "grunt-contrib-uglify": "~0.2.2"
, "grunt-contrib-qunit": "~0.2.2"
, "grunt-contrib-watch": "~0.5.1"
+ , "grunt-html-validation": "git://github.com/praveenvijayan/grunt-html-validation.git"
+ , "grunt-jekyll": "~0.3.8"
, "grunt-recess": "~0.3.3"
, "browserstack-runner": "~0.0.11"
}