grunt-contrib-jshint忽略不起作用 [英] grunt-contrib-jshint ignores has no effect
本文介绍了grunt-contrib-jshint忽略不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想排除 libs
目录中的内容。但是,忽略
选项
和种植 .jshintignore
文件项目目录不会将 libs
排除在外。
I would like to exclude libs
directory from being lint'ed. However, ignores
in options
and planted .jshintignore
file in project directory won't make libs
to be excluded.
jshint: {
options: {
smarttabs: true,
ignores: ['public/js/libs/**/*.js']
},
all: [
'Gruntfile.js',
'public/js/**/*.js'
]
},
咕噜版:
grunt version:
grunt-cli v0.1.11
grunt v0.4.2
grunt-contrib-jshint@0.7.2
我错过了什么?
What did I miss out?
推荐答案
忽略
是一个jshint选项,并且需要特定的文件。最好使用惯用的Grunt否定!
来排除文件:
ignores
is a jshint option and expects specific files. It's better to use the idiomatic Grunt negate !
to exclude files:
jshint: {
options: {
smarttabs: true
},
all: [
'Gruntfile.js',
'public/js/**/*.js',
'!public/js/libs/**/*.js'
],
},
请参阅 http://gruntjs.com/configuring-tasks#globbing-patterns
这篇关于grunt-contrib-jshint忽略不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文