2016-10-21 4 views
1

내가 그런트와 jshint에 대한 데모를 썼다 jshint - JUnit을-기자, 코드는 아래에 나열된 :예외 :

module.exports = function(grunt) { 
    grunt.loadNpmTasks('grunt-contrib-jshint'); 
    grunt.loadNpmTasks('jshint-junit-reporter'); 
    grunt.initConfig({ 
     jshint: { 
      all: ['Gruntfile.js'], 
      reporter: require("jshint-junit-reporter"), 
      reporterOutput: "junit-output.xml" 
     } 
    }); 
}; 

및 예외 가지고 :

여기 enter image description here

이 jshint의 결과를 -junit-reporter installation : enter image description here

및 관련 소프트웨어 버전 : npm : 3.10.8 툴툴-CLI V1.2.0 꿀꿀 1.0.1 nodeJS : v0.12.7 은 정말 어떤 조언을

답변

1

기자 감사 : 및 을 reporterOutput : 둘 옵션과 옵션 차단에 지정해야합니다. 당신의 작업을 업데이트 해보십시오 : 많은,

jshint: { 
    all: ['Gruntfile.js'], 
    options: { 
     reporter: require("jshint-junit-reporter"), 
     reporterOutput: "junit-output.xml" 
    } 
} 

https://github.com/gruntjs/grunt-contrib-jshint

+0

확인 테스트 감사 :) –