caipin 5 anos atrás
pai
commit
8cdebfdc1b
2 arquivos alterados com 30 adições e 1 exclusões
  1. 18 0
      .jshintrc
  2. 12 1
      Gruntfile.js

+ 18 - 0
.jshintrc

@@ -0,0 +1,18 @@
+{
+  "boss":false,
+  "urly":true,
+  "eqeqeq":true,
+  "eqnull":true,
+  "expr":true,
+  "immed":true,
+  "newcap":true,
+  "noempty":true,
+  "noarg":true,
+  "regexp":true,
+  "browser":true,
+  "devel":true,
+  "node":true,
+  "undef":true,
+  "asi":false,
+  "predef":['define']
+}

+ 12 - 1
Gruntfile.js

@@ -65,7 +65,17 @@ module.exports = function(grunt) {
 //                    'output/js/index.min.js': ['js/a.js', 'js/main/b.js']
 //                }
 //            }
+        },
+        
+        jshint:{
+        	options:{
+        		jshintrc:'.jshintrc'
+        	},
+        	build:['global/js/cloud/*.js']
         }
+
+        
+        
         
     	
     });
@@ -73,8 +83,9 @@ module.exports = function(grunt) {
 
     grunt.loadNpmTasks('grunt-contrib-concat');
     grunt.loadNpmTasks('grunt-contrib-uglify');
+    grunt.loadNpmTasks('grunt-contrib-jshint');
 
     //注册grunt默认任务
-    grunt.registerTask('default', ['concat','uglify']);
+    grunt.registerTask('default', ['concat','uglify','jshint']);
 
 };