简体   繁体   English

gulp-jshint任务需要5分钟以上才能完成

[英]gulp-jshint task is taking over 5 minutes to complete

I'm working with gulp and am fairly new, my gulp jshint task is as follow: 我正在使用gulp,但还很新,我的gulp jshint任务如下:

 gulp.task('jshint', ()=>{
  return gulp.src([`${root}/**/*.js`])
  .pipe(jshint('.jshintrc'))
  .pipe(jshint.reporter('jshint-stylish'))
  .pipe(jshint.reporter('gulp-jshint-html-reporter', { filename: 'jshint-output.html' }))
  .pipe(jshint.reporter('fail'));
});

The task is taking 5mins every time I run my build. 每次我运行构建时,任务要花费5分钟。 Is there anyway to speed this up? 反正有加速的吗?

$root is src, it is not running through node_modules. $ root是src,它未通过node_modules运行。

Thanks in advance! 提前致谢!

Figured it out, there were some lib files being picked up that shouldn't have and as they were huge they caused jshint to take longer. 弄清楚了,有一些不需要的lib文件被拾取,由于它们很大,导致jshint需要更长的时间。 flips desk 翻转桌子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM