minify_html 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -13
- data/lib/linux-ruby2.5 +0 -0
- data/lib/linux-ruby2.6 +0 -0
- data/lib/linux-ruby2.7 +0 -0
- data/lib/macos-ruby2.5 +0 -0
- data/lib/macos-ruby2.6 +0 -0
- data/lib/macos-ruby2.7 +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 055bf7f938939297d648f7d42eeec19a1bfeb55351f98e62352bc71bbcdee9bc
|
4
|
+
data.tar.gz: b5c92f3ae32547257335917ebeff230f2cb5dc082ce5ffaac87dff9c257c86fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 668db2a4213b8c491ef16b159f3e8e069ebd293c592064aa49d1dabb13d0de3b7d9c429772f1ec5c2b36d2847d99b86d9de3ee7dd93b9c94cfe98930bb52280a
|
7
|
+
data.tar.gz: ee8fe2a4100525ac354bfc5b8a8196e1a5599abeecff8213a5094826e3aab4b3bf5b4fa1e9e9be2e4bbd9960e67ae8f359093d848803cf6ca10394eea6f0545d
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ A Rust HTML minifier meticulously optimised for speed and effectiveness, with bi
|
|
19
19
|
|
20
20
|
Comparison with [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench)
|
21
21
|
|
22
|
-
<img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.
|
22
|
+
<img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.8.1/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.8.1/core/average-sizes.png">
|
23
23
|
|
24
24
|
The [onepass](https://github.com/wilsonzlin/minify-html/tree/master/rust/onepass) variant is even more optimised for speed. See its [README](https://github.com/wilsonzlin/minify-html/tree/master/rust/onepass) for more details.
|
25
25
|
|
@@ -32,11 +32,11 @@ Precompiled binaries are available for Linux, macOS, and Windows.
|
|
32
32
|
|
33
33
|
### Get
|
34
34
|
|
35
|
-
[Linux x64](https://wilsonl.in/minify-html/bin/0.
|
36
|
-
[Linux ARM64](https://wilsonl.in/minify-html/bin/0.
|
37
|
-
[macOS x64](https://wilsonl.in/minify-html/bin/0.
|
38
|
-
[macOS ARM64](https://wilsonl.in/minify-html/bin/0.
|
39
|
-
[Windows x64](https://wilsonl.in/minify-html/bin/0.
|
35
|
+
[Linux x64](https://wilsonl.in/minify-html/bin/0.8.1-linux-x86_64) |
|
36
|
+
[Linux ARM64](https://wilsonl.in/minify-html/bin/0.8.1-linux-arm64) |
|
37
|
+
[macOS x64](https://wilsonl.in/minify-html/bin/0.8.1-macos-x86_64) |
|
38
|
+
[macOS ARM64](https://wilsonl.in/minify-html/bin/0.8.1-macos-arm64) |
|
39
|
+
[Windows x64](https://wilsonl.in/minify-html/bin/0.8.1-windows-x86_64.exe)
|
40
40
|
|
41
41
|
### Use
|
42
42
|
|
@@ -55,7 +55,7 @@ minify-html --output /path/to/output.min.html --keep-closing-tags --minify-css /
|
|
55
55
|
|
56
56
|
```toml
|
57
57
|
[dependencies]
|
58
|
-
minify-html = { version = "0.
|
58
|
+
minify-html = { version = "0.8.1", features = ["js-esbuild"] }
|
59
59
|
```
|
60
60
|
|
61
61
|
Building with the `js-esbuild` feature requires the Go compiler to be installed as well, to build the [JS and CSS minifier](https://github.com/wilsonzlin/esbuild-rs).
|
@@ -120,7 +120,7 @@ Add as a Maven dependency:
|
|
120
120
|
<dependency>
|
121
121
|
<groupId>in.wilsonl.minifyhtml</groupId>
|
122
122
|
<artifactId>minify-html</artifactId>
|
123
|
-
<version>0.
|
123
|
+
<version>0.8.1</version>
|
124
124
|
</dependency>
|
125
125
|
```
|
126
126
|
|
@@ -288,14 +288,14 @@ Remove any leading/trailing whitespace from any leading/trailing text nodes of a
|
|
288
288
|
|
289
289
|
#### Element types
|
290
290
|
|
291
|
-
minify-html
|
291
|
+
minify-html assumes HTML and SVG elements are used in specific ways, based on standards and best practices. By making these assumptions, it can apply optimal whitespace minification strategies. If these assumptions do not hold, consider adjusting the HTML source or turning off whitespace minification.
|
292
292
|
|
293
293
|
|Group|Elements|Expected children|
|
294
294
|
|---|---|---|
|
295
|
-
|Formatting|`a`, `strong`, [and others](./
|
296
|
-
|Content|`h1`, `p`, [and others](
|
297
|
-
|Layout|`div`, `ul`, [and others](./
|
298
|
-
|Content-first|`label`, `li`, [and others](./
|
295
|
+
|Formatting|`a`, `strong`, [and others](./rust/common/spec/tag/whitespace.rs)|Formatting elements, text.|
|
296
|
+
|Content|`h1`, `p`, [and others](rust/common/spec/tag/whitespace.rs)|Formatting elements, text.|
|
297
|
+
|Layout|`div`, `ul`, [and others](./rust/common/spec/tag/whitespace.rs)|Layout elements, content elements.|
|
298
|
+
|Content-first|`label`, `li`, [and others](./rust/common/spec/tag/whitespace.rs)|Like content but could be layout with only one child.|
|
299
299
|
|
300
300
|
<details>
|
301
301
|
<summary><strong>Formatting elements</strong></summary>
|
data/lib/linux-ruby2.5
CHANGED
Binary file
|
data/lib/linux-ruby2.6
CHANGED
Binary file
|
data/lib/linux-ruby2.7
CHANGED
Binary file
|
data/lib/macos-ruby2.5
CHANGED
Binary file
|
data/lib/macos-ruby2.6
CHANGED
Binary file
|
data/lib/macos-ruby2.7
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minify_html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wilson Lin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fiddle
|