# gulp-beautify

> Asset beautification using js-beautify

Latest version **3.0.0** (published 2019-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-beautify
pnpm add gulp-beautify
yarn add gulp-beautify
bun add gulp-beautify
```

## 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 | 3.0.0 |
| Published | 2019-02-26 |
| First published | 2013-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 2 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fractal |
| Maintainers | contra, fractal, phated |
| Keywords | gulpplugin, beautify |

## Links

- npm: https://www.npmjs.com/package/gulp-beautify
- Repository: https://github.com/gulp-community/gulp-beautify
- Homepage: http://github.com/gulp-community/gulp-beautify
- Issues: https://github.com/gulp-community/gulp-beautify/issues
- npm.io page: https://npm.io/package/gulp-beautify

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ^2.0.0
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.8.8

## Recent versions

- 3.0.0 (latest) — 2019-02-26
- 2.0.1 — 2016-11-13
- 2.0.0 — 2015-09-25
- 1.1.2 — 2015-01-29
- 1.1.1 — 2014-11-08
- 1.1.0 — 2014-05-14
- 1.0.3 — 2013-12-31
- 1.0.2 — 2013-12-24
- 1.0.1 — 2013-12-10
- 1.0.0 — 2013-11-27

## README

# gulp-beautify

[![status](https://secure.travis-ci.org/gulp-community/gulp-beautify.png?branch=master)](https://travis-ci.org/gulp-community/gulp-beautify)

<table><tr><td>Package</td><td>gulp-beautify</td></tr><tr><td>Description</td><td>Asset beautification using js-beautify</td></tr><tr><td>Node Version</td><td>>= 0.10</td></tr></table>

## Usage

This is a gulp plugin for js-beautify.

```javascript
var beautify = require('gulp-beautify');

gulp.task('beautify', function() {
  return gulp
    .src('./src/*.js')
    .pipe(beautify.js({ indent_size: 2 }))
    .pipe(gulp.dest('./public/'));
});
```

As with js-beautify you can use it for [HTML & CSS](https://github.com/beautify-web/js-beautify#css--html):

```javascript
var beautify = require('gulp-beautify');

gulp.task('beautify-html', function() {
  return gulp
    .src('./src/*.html')
    .pipe(beautify.html({ indent_size: 2 }))
    .pipe(gulp.dest('./public/'));
});
gulp.task('beautify-css', function() {
  return gulp
    .src('./src/*.css')
    .pipe(beautify.css({ indent_size: 2 }))
    .pipe(gulp.dest('./public/'));
});

gulp.task('beautify-js', function() {
  // gulp-beautify exports are identical to js-beautify programmatic access
  // so beautify() is the old pattern for beautify.js()
  return gulp
    .src('./src/*.js')
    .pipe(beautify({ indent_size: 2 }))
    .pipe(gulp.dest('./public/'));
});
```

## Options

Any options will be passed directly to [js-beautify](https://github.com/beautify-web/js-beautify).

## LICENSE

MIT

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