gulp-jscs autofix不起作用 [英] gulp-jscs autofix doesn't work

查看:157
本文介绍了gulp-jscs autofix不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的gulpfile.js下面的代码

I have the following code in my gulpfile.js

gulp.src(['server.js'])
    .pipe(jscs({fix: true}))
    .pipe(gulp.dest('prod-app'));

但prod-app / server.js与server.js文件相同。没有任何修复。如何解决它?

But in prod-app/server.js is the same file as server.js. Without any fixes. How to fix it?

推荐答案

您可以阅读 base 选项修改了很多的脚本一起这里和使用它像这样:

You can read about base option to modify a lot of scripts together here and use it like this:

gulp.task( '棉绒JSCS修复',函数(){
返回gulp.src(quantumArtScripts,{基:'./'})
.pipe(jscs({fix:true}))
.pipe(jscs.reporter())//记录应该修复的所有错误
。 pipe(gulp.dest('。'))//文件的目的地
.on('error',console.error.bind(console));
});

这篇关于gulp-jscs autofix不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆