grunt plugin for html compression, using htmlcompressor.jar
JavaScript
Switch branches/tags
Nothing to show
Latest commit 76b7ab1 Dec 16, 2013 @jney bump version
Permalink
Failed to load latest commit information.
bin first commit Jul 21, 2012
ext first commit Jul 21, 2012
tasks Prevent the concurrentProccess option from being passed to Java Dec 16, 2013
test migrating to v0.4.0a Oct 24, 2012
.gitignore first commit Jul 21, 2012
.npmignore first commit Jul 21, 2012
.travis.yml only support node.js 0.8 Aug 23, 2012
Gruntfile.js migrating to v0.4.0a Oct 24, 2012
LICENSE-MIT
README.md fixing async again Sep 23, 2012
package.json bump version Dec 16, 2013

README.md

build status

grunt-htmlcompressor

Grunt plugin for html compression, using htmlcompressor.

Getting Started

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

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

grunt.loadNpmTasks('grunt-htmlcompressor');

Then specify what files to compress in your config:

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

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.