https://github.com/gsmlg-dev/ex_html_minifier
https://github.com/gsmlg-dev/ex_html_minifier
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gsmlg-dev/ex_html_minifier
- Owner: gsmlg-dev
- License: mit
- Created: 2025-02-14T04:44:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-17T10:17:19.000Z (over 1 year ago)
- Last Synced: 2025-06-04T11:34:29.598Z (about 1 year ago)
- Language: Elixir
- Size: 3.11 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HtmlMinifier
[](https://github.com/gsmlg-dev/ex_html_minifier/actions/workflows/elixir_ci.yml)
[](https://hex.pm/packages/html_minifier)
[](https://hexdocs.pm/html_minifier/)
[](https://hex.pm/packages/html_minifier)
[](https://hex.pm/packages/html_minifier)
## Installation
The package can be installed
by adding `html_minifier` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:html_minifier, "~> 0.1"}
]
end
```
## Examples
```elixir
iex> HtmlMinifier.minify("
A ", %HtmlMinfier{})
" A "
```
## Config
```elixir
%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()
}
```