Skip to content

jney/grunt-htmlcompressor

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
ext
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

grunt plugin for html compression, using htmlcompressor.jar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published