1.0.1 • Published 7 years ago

gulp-pretty v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

gulp-pretty

Source code formatting using prettier

Install

$ npm install --save-dev gulp-pretty

Usage

const gulp = require('gulp');
const pretty = require('gulp-pretty');

// prettier can be called by itself...
gulp.task('format', () =>
  gulp
    .src('src/**/*.js')
    .pipe(pretty())
    .pipe(gulp.dest('src/'))
);

// ...or with options.
gulp.task('format-with-options', () =>
  gulp
    .src('src/**/*.js')
    .pipe(
      pretty({
        singleQuote: true,
        trailingComma: 'es5',
      })
    )
    .pipe(gulp.dest('src/'))
);