# gulp-ng-prettier

> Create vinyl streams to pipe to prettier

Latest version **1.2.0** (published 2018-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-ng-prettier
pnpm add gulp-ng-prettier
yarn add gulp-ng-prettier
bun add gulp-ng-prettier
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2018-01-17 |
| First published | 2017-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rostyslav Belmeha |
| Maintainers | rbelmega |
| Keywords | gulp, prettier, gulp-prettier, gulp-ng-prettier |

## Links

- npm: https://www.npmjs.com/package/gulp-ng-prettier
- Repository: https://github.com/rbelmega/gulp-ng-prettier
- Homepage: https://github.com/rbelmega/gulp-ng-prettier#readme
- Issues: https://github.com/rbelmega/gulp-ng-prettier/issues
- npm.io page: https://npm.io/package/gulp-ng-prettier

## Dependencies (5)

- [merge](https://npm.io/package/merge.md) 1.2.0
- [prettier](https://npm.io/package/prettier.md) 1.10.0
- [through2](https://npm.io/package/through2.md) 2.0.3
- [gulp-util](https://npm.io/package/gulp-util.md) 3.0.8
- [vinyl-sourcemaps-apply](https://npm.io/package/vinyl-sourcemaps-apply.md) 0.2.1

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2018-01-17
- 1.1.0 — 2017-11-13
- 1.0.2 — 2017-10-29
- 1.0.1 — 2017-10-28

## README

# Gulp Prettier [![Build Status](https://travis-ci.org/rbelmega/gulp-ng-prettier.svg?branch=master)](https://travis-ci.org/rbelmega/gulp-ng-prettier) [![GitHub version](https://badge.fury.io/gh/rbelmega%2Fgulp-ng-prettier.svg)](https://badge.fury.io/gh/rbelmega%2Fgulp-ng-prettier) [![npm version](https://badge.fury.io/js/gulp-ng-prettier.svg)](https://badge.fury.io/js/gulp-ng-prettier)

A [Gulp](http://gulpjs.com/) plugin which allows the users to use [Prettier](https://github.com/jlongster/prettier).

> Prettier is an opinionated JavaScript formatter inspired by refmt with advanced support for language features from ES2017, JSX, and Flow. It removes all original styling and ensures that all outputted JavaScript conforms to a consistent style. (See this blog post)


## Usage

Simply pipe the input, and pass in arguments that you would to the regular format function.

```js
const gulp = require('gulp'),
  prettier = require('gulp-ng-prettier');

gulp.task('default', () => {
	gulp.src('*.js')
	.pipe(prettier({ parser: 'flow' }))
	.pipe(gulp.dest('./'))
});
```

Please consult the [Prettier](https://github.com/jlongster/prettier) README to know the possible optional arguments. At the time of this writing, these are the following optional arguments.

```js
{
    // Fit code within this line limit
    printWidth: 100,
  
    // Number of spaces it should use per tab
    tabWidth: 2,
  
    // Use tabs instead of spaces
    useTabs: false,
  
    // Specify which parser to use.
    parser: 'flow',
  
    // If true, will use single instead of double quotes
    singleQuote: false,
  
    // Controls the printing of trailing commas wherever possible
    trailingComma: 'none',
  
    // Controls the printing of spaces inside array and objects
    bracketSpacing: true,
  
    // Print semicolons at the ends of statements
    semi: true
}
```

## License

[MIT License](https://raw.githubusercontent.com/rbelmega/gulp-ng-prettier/master/LICENSE)

---
_Source: https://npm.io/package/gulp-ng-prettier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
