Skip to content
Ruby wrapper for kangax html-minifier
JavaScript Ruby
Find file
Latest commit 8217f1e Dec 9, 2012 @stereobooster v0.0.4
Failed to load latest commit information.
lib v0.0.4 Dec 9, 2012
spec add node to travis tests Dec 9, 2012
vendor update html-minifier to kangax/html-minifier@7032d3d May 23, 2012
.gitignore v0.0.1 May 8, 2012
.gitmodules add html-minifier git submodule May 8, 2012
.travis.yml add node to travis tests Dec 9, 2012
Gemfile
README.md update readme May 23, 2012
Rakefile add node to travis tests Dec 9, 2012
html_minifier.gemspec Update to support latest ExecJS Dec 9, 2012

README.md

HtmlMinifier

Build Status

Ruby wrapper for js library html-minifier. If you want pure ruby use html_press

Installation

html_minifier is available as ruby gem.

$ gem install html_minifier

Ensure that your environment has a JavaScript interpreter supported by ExecJS. Usually, installing therubyracer gem is the best alternative.

Usage

require 'html_minifier'

HtmlMinifier.minify(File.read("source.html"))

When initializing HtmlMinifier, you can pass options

HtmlMinifier::minifier.new( <options> ).minify(source)
# Or
HtmlMinifier.minify(source, <options>)

TODO

  • add Rake task
  • add color reporter. Maybe colorize
  • add cli
Something went wrong with that request. Please try again.