From 3f0457a82088ded51c96e1614d8a5d0df3ecce89 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 15 Nov 2013 00:59:43 +0900 Subject: [PATCH] =?UTF-8?q?grunt.=20jshint=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gruntfile.js | 32 +++++++++++++++++++++++++++++--- package.json | 19 ++++++++++--------- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 6371c166e..4a667d07a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,6 +4,31 @@ module.exports = function(grunt) { grunt.file.defaultEncoding = 'utf8'; grunt.initConfig({ + jshint: { + files: [ + 'Gruntfile.js', + // 'common/js/*.js', '!common/js/html5.js', '!common/js/jquery.js', '!common/js/x.js', '!common/js/xe.js', + // 'addons/**/*.js', + // 'modules/**/*.js', + // 'layouts/**/*.js', + // 'm.layouts/**/*.js', + // 'widgets/**/*.js', + // 'widgetstyles/**/*.js', + '!**/*.min.js', + '!**/*-packed.js' + ], + options : { + globalstrict: false, + undef : false, + eqeqeq: false, + browser : true, + globals: { + "jQuery" : true, + "console" : true, + "window" : true + } + } + }, }); grunt.registerTask('build', '', function(A, B) { @@ -63,8 +88,7 @@ module.exports = function(grunt) { grunt.util.spawn({ cmd: "tar", - args: ['xf', 'build/temp.full.tar', '-C' - , 'build/xe'], + args: ['xf', 'build/temp.full.tar', '-C', 'build/xe'] }, function (error, result, code) { // krzip @@ -104,5 +128,7 @@ module.exports = function(grunt) { }); }); - grunt.registerTask('default', ['build']); + grunt.loadNpmTasks('grunt-contrib-jshint'); + + grunt.registerTask('default', ['jshint']); }; diff --git a/package.json b/package.json index 3517b4a32..28b98dfe2 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { - "name": "XpressEngine", - "devDependencies": { - "grunt": ">0.4.0", - "grunt-contrib-clean": "~0.5.0" - }, - "main": "Gruntfile.js", - "scripts": { - "test": "grunt" - } + "name": "XpressEngine", + "devDependencies": { + "grunt": ">0.4.0", + "grunt-contrib-clean": "~0.5.0", + "grunt-contrib-jshint": "~0.7.1" + }, + "main": "Gruntfile.js", + "scripts": { + "test": "grunt" + } }