Skip to content

gsmlg-dev/ex_html_minifier

Repository files navigation

HtmlMinifier

Elixir CI Hex.pm Hexdocs.pm Hex.pm Hex.pm

Installation

The package can be installed by adding html_minifier to your list of dependencies in mix.exs:

def deps do
  [
    {:html_minifier, "~> 0.1"}
  ]
end

Examples

iex> HtmlMinifier.minify("<div>      A       </div>", %HtmlMinfier{})
"<div> A </div>"

Config

%HtmlMinifier{
  keep_closing_tags: boolean(),
  keep_html_and_head_opening_tags: boolean(),
  keep_spaces_between_attributes: boolean(),
  minify_css: boolean(),
  minify_js: boolean(),
  remove_bangs: boolean(),
  remove_processing_instructions: boolean(),
  do_not_minify_doctype: boolean(),
  ensure_spec_compliant_unquoted_attribute_values: boolean(),
  keep_comments: boolean(),
  keep_input_type_text_attr: boolean(),
  keep_ssi_comments: boolean(),
  preserve_brace_template_syntax: boolean(),
  preserve_chevron_percent_template_syntax: boolean()
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •