# grunt-htmlcompressor

> compress html with grunt and htmlcompressor

Latest version **0.1.10** (published 2013-12-16) · 0 weekly downloads

## Install

```sh
npm install grunt-htmlcompressor
pnpm add grunt-htmlcompressor
yarn add grunt-htmlcompressor
bun add grunt-htmlcompressor
```

Provides the command `grunt-htmlcompressor`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2013-12-16 |
| First published | 2012-07-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+8 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Jean-Sébastien Ney |
| Maintainers | jney |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-htmlcompressor
- Repository: https://github.com/jney/grunt-htmlcompressor
- Issues: https://github.com/jney/grunt-htmlcompressor/issues
- npm.io page: https://npm.io/package/grunt-htmlcompressor

## Dependencies (2)

- [grunt](https://npm.io/package/grunt.md) ~0.4.0
- [lodash](https://npm.io/package/lodash.md) ~2.2.1

## Recent versions

- 0.1.10 (latest) — 2013-12-16
- 0.1.9 — 2013-11-13
- 0.1.8 — 2013-01-12
- 0.1.7 — 2013-01-12
- 0.1.5 — 2012-10-24
- 0.1.4 — 2012-09-23
- 0.1.3 — 2012-09-18
- 0.1.2 — 2012-09-18
- 0.1.1 — 2012-09-17
- 0.1.0 — 2012-09-05
- 0.0.1 — 2012-07-21

## README

[![build status](https://secure.travis-ci.org/jney/grunt-htmlcompressor.png)](http://travis-ci.org/jney/grunt-htmlcompressor)
# grunt-htmlcompressor

[Grunt][grunt] plugin for html compression, using [htmlcompressor][htmlcompressor].

## Getting Started

Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-htmlcompressor`

Then add this line to your project's `grunt.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-htmlcompressor');
```

Then specify what files to compress in your config:

```javascript
grunt.initConfig({
  htmlcompressor: {
    compile: {
      files: {
        'dest/index.html': 'src/index.html'
      },
      options: {
        type: 'html',
        preserveServerScript: true
      }
    }
  }
});
```
### Options

#### htmlcompressor options

Options can be whatever `htmlcompressor accepts`

#### input/output files

`src` can be a string or a function
`processName` can help you formating the output instead of using `dest`

[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
[htmlcompressor]: http://code.google.com/p/htmlcompressor/

## Release History
* 0.1.4 Async fixing
* 0.1.0 Dynamic input (`src` parameter can be a function) and output (`processName`) files
* 0.0.1 First Release

## License
Copyright (c) 2012 Jean-Sébastien Ney
Licensed under the MIT license.

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