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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -