The esformatter
project is no longer maintained.
Beautify JavaScript code with esformatter
Issues with the output should be reported on the esformatter issue tracker.
$ npm install --save-dev gulp-esformatter
const gulp = require('gulp');
const esformatter = require('gulp-esformatter');
gulp.task('default', () =>
gulp.src('src/app.js')
.pipe(esformatter({indent: {value: ' '}}))
.pipe(gulp.dest('dist'))
);
See the esformatter options.
Options are passed to esformatter.rc()
.
MIT © Sindre Sorhus