Skip to content

Commit c22fb56

Browse files
committed
Grunt: Add grunt-html for html validation
1 parent ce3c7fa commit c22fb56

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

grunt.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ cssFiles.forEach(function( file ) {
7373
grunt.loadNpmTasks( "grunt-css" );
7474
// file size comparison tasks
7575
grunt.loadNpmTasks( "grunt-compare-size" );
76+
// html validation task
77+
grunt.loadNpmTasks( "grunt-html" );
7678

7779
grunt.registerHelper( "strip_all_banners", function( filepath ) {
7880
return grunt.file.read( filepath ).replace( /^\s*\/\*[\s\S]*?\*\/\s*/g, "" );
@@ -138,6 +140,9 @@ grunt.initConfig({
138140
},
139141
min: minify,
140142
cssmin: minifyCSS,
143+
html: {
144+
all: ["demos/**/*.html", "tests/**/*.html"]
145+
},
141146
copy: {
142147
dist: {
143148
src: [
@@ -504,7 +509,7 @@ grunt.registerTask( "clean", function() {
504509
require( "rimraf" ).sync( "dist" );
505510
});
506511

507-
grunt.registerTask( "default", "lint csslint qunit build compare_size" );
512+
grunt.registerTask( "default", "lint csslint html qunit build compare_size" );
508513
grunt.registerTask( "sizer", "concat:ui min:dist/jquery-ui.min.js compare_size" );
509514
grunt.registerTask( "build", "concat min cssmin" );
510515
grunt.registerTask( "release", "clean build copy:dist copy:dist_min copy:dist_min_images copy:dist_css_min md5:dist zip:dist" );

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"grunt": "0.3.9",
3030
"grunt-css": "0.1.1",
3131
"grunt-compare-size": "0.1.1",
32+
"grunt-html": "0.1.x",
3233
"request": "2.9.153",
3334
"rimraf": "2.0.1"
3435
},

0 commit comments

Comments
 (0)