https://github.com/jney/grunt-htmlcompressor
grunt plugin for html compression, using htmlcompressor.jar
https://github.com/jney/grunt-htmlcompressor
Last synced: 11 months ago
JSON representation
grunt plugin for html compression, using htmlcompressor.jar
- Host: GitHub
- URL: https://github.com/jney/grunt-htmlcompressor
- Owner: jney
- License: mit
- Created: 2012-07-21T18:16:10.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T21:45:16.000Z (over 2 years ago)
- Last Synced: 2025-04-23T19:52:23.670Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.61 MB
- Stars: 35
- Watchers: 2
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
- awesome-wpo - Grunt-htmlcompressor - Grunt plugin for HTML compression, using htmlcompressor. (Minifiers - HTML / Meetups)
- fucking-awesome-wpo - Grunt-htmlcompressor - Grunt plugin for HTML compression, using htmlcompressor. (Minifiers - HTML / Meetups)
- awesome-wpo-chinese - Grunt-htmlcompressor - Grunt plugin for html compression, using htmlcompressor. (Minifiers - HTML)
- awesome-wpo-dup - Grunt-htmlcompressor - Grunt plugin for html compression, using htmlcompressor. (Minifiers - HTML)
README
[](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.