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
Post a Comment