Update README and description

This commit is contained in:
Wilson Lin 2020-07-12 14:05:12 +10:00
parent 2726f2e454
commit 75ba1a9d01
6 changed files with 18 additions and 15 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "minify-html"
description = "Fast allocation-less HTML minifier with smart whitespace handling"
description = "Uncompromisingly fast and smart HTML + JS minifier"
license = "MIT"
homepage = "https://github.com/wilsonzlin/minify-html"
readme = "README.md"

View File

@ -1,19 +1,22 @@
# minify-html
A fast one-pass in-place HTML minifier written in Rust with context-aware whitespace handling.
Uncompromisingly fast and smart HTML + JS minifier, available for Rust, Node.js, Python, Java, and Ruby.
Also supports JS minification by plugging into [esbuild](https://github.com/evanw/esbuild).
**Smart**
Available as:
- CLI for macOS and Linux.
- Rust library.
- Native library for Node.js, Python, Java, and Ruby.
- Transforms `&am&` to `&am&ampamp;` which saves 2 bytes but leaves meaning intact, and leaves `≫⃒` encoded because it's longer decoded.
- Trims and collapses whitespace in `<p>` because it contains text, and removes contiguous whitespace in `<ul>` to allow for inline-block.
- Tries all three attribute value delimiters (`'`, `"`, and none) and picks the shortest, and then removes them if they're the default value based on the spec.
- References the entire official [entities list](./gen/data/entities.json) and [HTML namespace](./gen/data/react.d.ts) for maximum minification leverage.
## Features
**Fast**
- Minification is done in one pass with no backtracking or DOM/AST building.
- No extra heap memory is allocated during processing, which increases performance.
- Context-aware whitespace handling allows maximum minification while retaining desired spaces.
- Does all of the above in one pass, with zero memory allocations, and works on bytes directly.
- Uses Rust, SIMD-accelerated memchr, direct tries, and lookup tables.
- Written fully in Rust, and natively binds to [esbuild](https://github.com/evanw/esbuild) for super fast JS minification.
- Natively binds to Node.js, Python, Java, and Ruby, for fast speed from the comfort of your favourite language.
**Support**
- Well tested with a large test suite and extensive [fuzzing](./fuzz).
## Performance

View File

@ -9,7 +9,7 @@
<version>0.2.6</version>
<name>minify-html</name>
<description>Fast allocation-less HTML minifier with smart whitespace handling</description>
<description>Uncompromisingly fast and smart HTML + JS minifier</description>
<url>https://github.com/wilsonzlin/minify-html</url>
<developers>
<developer>

View File

@ -1,7 +1,7 @@
{
"name": "@minify-html/js-esbuild",
"version": "0.2.6",
"description": "Fast allocation-less HTML minifier with smart whitespace handling",
"description": "Uncompromisingly fast and smart HTML + JS minifier",
"main": "dist/index.js",
"files": [
"dist/**",

View File

@ -1,7 +1,7 @@
[package]
publish = false
name = "minify_html"
description = "Fast allocation-less HTML minifier with smart whitespace handling"
description = "Uncompromisingly fast and smart HTML + JS minifier"
license = "MIT"
homepage = "https://github.com/wilsonzlin/minify-html"
readme = "README.md"

View File

@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
spec.email = ["code@wilsonl.in"]
spec.license = "MIT"
spec.files = FileList["lib/*", "README.md"].to_a
spec.summary = "Fast allocation-less HTML minifier with smart whitespace handling"
spec.summary = "Uncompromisingly fast and smart HTML + JS minifier"
spec.homepage = "https://github.com/wilsonzlin/minify_html"
spec.require_paths = ["lib"]