我想用grunt運行jshint。這工作,但現在我想輸出爲HTML。這裏是我的咕嚕文件grunt:如何生成jshint輸出爲HTML
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'src/*.js']
, options: {
//reporter: 'jslint'
reporter:'checkstyle'
, reporterOutput: 'jshint.html'
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
};
運行此grunt taks,輸出是XML。任何建議如何將其轉化爲輸出HTML的東西?
非常感謝
那麼,有人寫過這樣的記者嗎?這應該是非常簡單的,我寧願使用現有的而不是試圖重新實現它。 –
我還沒有看到現有的HTML記者。大多數只是XML和JSON。 –
你可以檢查這個:[jshint-html-reporter](https://www.npmjs.org/package/jshint-html-reporter)。 我曾經在CI版本中顯示報告,它像一個魅力。 – tuchi35