0.01
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for kangax js library html-minifier. If you want pure ruby use html_press
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0.1.0

Runtime

 Project Readme

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