Ver Fonte

Added bootlint for pages

freezy há 9 anos atrás
pai
commit
f68e1edb0e
2 ficheiros alterados com 12 adições e 0 exclusões
  1. 11 0
      Gruntfile.js
  2. 1 0
      package.json

+ 11 - 0
Gruntfile.js

@@ -124,6 +124,7 @@ module.exports = function (grunt) {
       }
     },
 
+    // Validate CSS files
     csslint: {
       options: {
         csslintrc: 'build/less/.csslintrc'
@@ -133,6 +134,11 @@ module.exports = function (grunt) {
       ]
     },
 
+    // Validate Bootstrap HTML
+    bootlint: {
+      files: ['pages/**/*.html']
+    },
+
     // Delete images in build directory
     // After compressing the images in the build/img dir, there is no need
     // for them
@@ -159,6 +165,11 @@ module.exports = function (grunt) {
   grunt.loadNpmTasks('grunt-contrib-clean');
   // Lint CSS
   grunt.loadNpmTasks('grunt-contrib-csslint');
+  // Lint Bootstrap
+  grunt.loadNpmTasks('grunt-bootlint');
+
+  // Linting task
+  grunt.registerTask('lint', ['jshint', 'csslint', 'bootlint']);
 
   // The default task (running "grunt" in console) is "watch"
   grunt.registerTask('default', ['watch']);

+ 1 - 0
package.json

@@ -9,6 +9,7 @@
   "devDependencies": {
     "R2": "^1.4.3",
     "grunt": "~0.4.5",
+    "grunt-bootlint": "^0.9.1",
     "grunt-contrib-clean": "^0.6.0",
     "grunt-contrib-csslint": "^0.5.0",
     "grunt-contrib-cssmin": "^0.12.2",