# laravel-elixir-minify-html

> Minify the HTML that gets generated by your Blade template files or just static HTML files with Laravel Elixir.

Latest version **1.0.5** (published 2016-06-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install laravel-elixir-minify-html
pnpm add laravel-elixir-minify-html
yarn add laravel-elixir-minify-html
bun add laravel-elixir-minify-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.5 |
| Published | 2016-06-13 |
| First published | 2016-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Honoré Hounwanou |
| Maintainers | mercuryseries |
| Keywords | laravel, elixir, html-minify, laravel-elixir-minify-html, minify blade files, minify static html |

## Links

- npm: https://www.npmjs.com/package/laravel-elixir-minify-html
- Repository: https://github.com/mercuryseries/laravel-elixir-minify-html
- Homepage: https://github.com/mercuryseries/laravel-elixir-minify-html#readme
- Issues: https://github.com/mercuryseries/laravel-elixir-minify-html/issues
- npm.io page: https://npm.io/package/laravel-elixir-minify-html

## Dependencies (2)

- [gulp](https://npm.io/package/gulp.md) ^3.9.1
- [gulp-htmlmin](https://npm.io/package/gulp-htmlmin.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.5 (latest) — 2016-06-13
- 1.0.4 — 2016-06-13
- 1.0.3 — 2016-06-13
- 1.0.2 — 2016-06-13
- 1.0.1 — 2016-06-13
- 1.0.0 — 2016-06-13

## README

# Laravel Elixir HTML minify

This package allows you to minify static HTML files or the HTML that gets generated by your Blade template files. It works very well and is very configurable. It uses [gulp-htmlmin](https://github.com/jonschlinkert/gulp-htmlmin), which uses [html-minifier](https://github.com/kangax/html-minifier).

## Installation

First you need to install this package.

```sh
npm install --save-dev laravel-elixir-minify-html
```

Then require this package into your `gulpfile.js`.

```js
var Elixir = require('laravel-elixir');
require('laravel-elixir-minify-html');
```

Then call the `html` method from your mix.

The `html` method can take up to three arguments:

  1. `src` (required): The files to minify.
  2. `outputPath` (optional): The output folder (defaults to `storage/framework/views`).
  3. `options` (optional):  Options object passed to the `gulp-htmlmin` task.

This task defines a watcher for the path defined in `src`.

Sample code:

```js
Elixir(function(mix) {
    mix.html('storage/framework/views/*', 'storage/framework/views/', {collapseWhitespace: true, removeAttributeQuotes: true, removeComments: true, minifyJS: true});
});
```

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