Skip to content

Commit

Permalink
add HTML5 validation of docs pages to the build
Browse files Browse the repository at this point in the history
  • Loading branch information
cvrebert committed Aug 13, 2013
1 parent 715e924 commit bb5be0a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ nbproject
*.komodoproject
.komodotools

# grunt-html-validation
validation-staus.json

# Folders to ignore
.hg
.svn
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: node_js
node_js:
- 0.8
before_script:
- gem install jekyll
- npm install -g grunt-cli
env:
global:
Expand Down
20 changes: 19 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>',
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit bb5be0a

Please sign in to comment.