# @awea/gulp-pretty-html

> A simple gulp plugin to make HTML pretty

Latest version **1.0.1** (published 2018-08-16) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @awea/gulp-pretty-html
pnpm add @awea/gulp-pretty-html
yarn add @awea/gulp-pretty-html
bun add @awea/gulp-pretty-html
```

## 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.0.1 |
| Published | 2018-08-16 |
| First published | 2018-04-05 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Awea |
| Maintainers | awea |
| Keywords | beautify, prettify, gulp, html |

## Links

- npm: https://www.npmjs.com/package/@awea/gulp-pretty-html
- Repository: https://github.com/Awea/gulp-pretty-html
- Issues: https://github.com/Awea/gulp-pretty-html/issues
- npm.io page: https://npm.io/package/@awea/gulp-pretty-html

## Dependencies (1)

- [pretty](https://npm.io/package/pretty.md) ^2.0.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-08-16
- 1.0.0 — 2018-04-05

## README

# Gulp pretty HTML
A simple Gulp plugin to make HTML pretty.

## Why?
Sometimes you need to deliver pretty HTML. Since Jade became [Pug](https://pugjs.org/api/getting-started.html) the `pretty` option has been marked as deprecated. This small plugin intends to replace it.

I made it for that usage but may be there is others, dunno :)

## Prerequisites
* Gulp >= 3

## Installation

`npm install @awea/gulp-pretty-html`

**or**

`yarn add @awea/gulp-pretty-html`

## Options

Gulp pretty HTML uses [Pretty](https://github.com/jonschlinkert/pretty) to prettify the HTML. The only option is `{ocd: true / false}`. As explained in Pretty README this option will:

> condenses multiple newlines to a single newline
> trims leading and trailing whitespace
> ensures that a trailing newline is inserted
> normalizes whitespace before code comments

## Usage example

For a given gulp `pug` task:

```js
gulp.task('pug', function (done) {
  gulp.src('templates/**/*.pug')
    .pipe(pug())
    .pipe(gulp.dest('./dist'))
    .on('end', done)
});
```

Simply add `pretty()` after `pug()`:

```js
var pretty = require('@awea/gulp-pretty-html')

gulp.task('pug', function (done) {
  gulp.src('templates/**/*.pug')
    .pipe(pug())
    .pipe(pretty())
    .pipe(gulp.dest('./dist'))
    .on('end', done)
});
```

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