javascript - gulp-jscs autofix doesn't work -


i have following code in gulpfile.js

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

but in prod-app/server.js same file server.js. without fixes. how fix it?

you can read base option modify lot of scripts here , use this:

gulp.task('lint-jscs-fix', function() { return gulp.src(quantumartscripts, { base: './' }) .pipe(jscs({ fix: true })) .pipe(jscs.reporter()) // log errors should fixed .pipe(gulp.dest('.')) // destination of files .on('error', console.error.bind(console)); });


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -