gulp jshint $ 未定义
? jshint ? ? gulp ?    2015-01-05 20:46:44    662    2    0

jshint说$未定义

解决方法:

You can also add two lines to your .jshintrc

  "globals": {
    "$": false,
    "jQuery": false
  }

This tells jshint that there are two global variables. false 表示只读

Gulpfile.js:

gulp.task('jshint', function() {
	return gulp.src([
		'./*.js',
		'./app/**/*.js',
		'./public/res/classes/**/*.js',
		'./public/res/extensions/**/*.js',
		'./public/res/helpers/**/*.js',
		'./public/res/providers/**/*.js',
		'./public/res/*.js'
	])
		.pipe(jshint(".jshintrc")) // 这里必须!!
		.pipe(jshint.reporter('default'))
		.pipe(jshint.reporter('fail'));
});


上一篇: git 分支管理

下一篇: Leanote Bug修复 12-26 (Ace, tab)

662 人读过