minify_html 0.10.8 → 0.11.2
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 +16 -16
- 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: f5537e42eacc7091483ca9a5c0043a22d64d54df4fb55d4b593188f25ae7954a
|
|
4
|
+
data.tar.gz: 5e48edba774f49dbabdb4250218da105980502ab868bdf2fa8ea134004f9c6ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 628e924514ddce607eed5d7a4944961676226731df2626f0e2fd6b66b2ed3bed37bba1089e13ebf3b873a009182b92e6ca85600b63a7a91a380940821a6b6074
|
|
7
|
+
data.tar.gz: 9714941d4baaec940dbad6d75235a356bc4d010fca00efbede3b5a6dd5938d99ba5eeaa63c71be9894608a692d352943f1631ce27668b87c5510b68d7b8f4bb9
|
data/README.md
CHANGED
|
@@ -23,7 +23,7 @@ View the [changelog](./CHANGELOG.md) to see the latest updates.
|
|
|
23
23
|
|
|
24
24
|
Comparison with [html-minifier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench)
|
|
25
25
|
|
|
26
|
-
<img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.
|
|
26
|
+
<img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.11.2/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.11.2/core/average-sizes.png">
|
|
27
27
|
|
|
28
28
|
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.
|
|
29
29
|
|
|
@@ -36,10 +36,10 @@ Precompiled binaries are available for Linux, macOS, and Windows.
|
|
|
36
36
|
|
|
37
37
|
### Get
|
|
38
38
|
|
|
39
|
-
[Linux x64](https://wilsonl.in/minify-html/bin/0.
|
|
40
|
-
[Linux ARM64](https://wilsonl.in/minify-html/bin/0.
|
|
41
|
-
[macOS x64](https://wilsonl.in/minify-html/bin/0.
|
|
42
|
-
[Windows x64](https://wilsonl.in/minify-html/bin/0.
|
|
39
|
+
[Linux x64](https://wilsonl.in/minify-html/bin/0.11.2-linux-x86_64) |
|
|
40
|
+
[Linux ARM64](https://wilsonl.in/minify-html/bin/0.11.2-linux-arm64) |
|
|
41
|
+
[macOS x64](https://wilsonl.in/minify-html/bin/0.11.2-macos-x86_64) |
|
|
42
|
+
[Windows x64](https://wilsonl.in/minify-html/bin/0.11.2-windows-x86_64.exe)
|
|
43
43
|
|
|
44
44
|
### Use
|
|
45
45
|
|
|
@@ -64,7 +64,7 @@ minify-html --keep-closing-tags --minify-css /path/to/**/*.html
|
|
|
64
64
|
|
|
65
65
|
```toml
|
|
66
66
|
[dependencies]
|
|
67
|
-
minify-html = "0.
|
|
67
|
+
minify-html = "0.11.2"
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
### Use
|
|
@@ -76,14 +76,14 @@ Check out the [docs](https://docs.rs/minify-html) for API and usage examples.
|
|
|
76
76
|
<details>
|
|
77
77
|
<summary><img width="24" src="https://wilsonl.in/minify-html/icon/deno.png"> <strong>Deno</strong></summary>
|
|
78
78
|
|
|
79
|
-
- Package: https://wilsonl.in/minify-html/deno/0.
|
|
79
|
+
- Package: https://wilsonl.in/minify-html/deno/0.11.2/index.js
|
|
80
80
|
- Binding: [WASM](https://webassembly.org/)
|
|
81
81
|
- Platforms: All
|
|
82
82
|
|
|
83
83
|
### Use
|
|
84
84
|
|
|
85
85
|
```ts
|
|
86
|
-
import init, {minify} from "https://wilsonl.in/minify-html/deno/0.
|
|
86
|
+
import init, {minify} from "https://wilsonl.in/minify-html/deno/0.11.2/index.js";
|
|
87
87
|
|
|
88
88
|
const encoder = new TextEncoder();
|
|
89
89
|
const decoder = new TextDecoder();
|
|
@@ -149,7 +149,7 @@ Add as a Maven dependency:
|
|
|
149
149
|
<dependency>
|
|
150
150
|
<groupId>in.wilsonl.minifyhtml</groupId>
|
|
151
151
|
<artifactId>minify-html</artifactId>
|
|
152
|
-
<version>0.
|
|
152
|
+
<version>0.11.2</version>
|
|
153
153
|
</dependency>
|
|
154
154
|
```
|
|
155
155
|
|
|
@@ -266,7 +266,7 @@ There are three whitespace minification methods. When processing text content, m
|
|
|
266
266
|
<details>
|
|
267
267
|
<summary><strong>Collapse whitespace</strong></summary>
|
|
268
268
|
|
|
269
|
-
> **Applies to:** any element except [whitespace sensitive](./src/spec/tag/whitespace.rs) elements.
|
|
269
|
+
> **Applies to:** any element except [whitespace sensitive](./minify-html-common/src/spec/tag/whitespace.rs) elements.
|
|
270
270
|
|
|
271
271
|
Reduce a sequence of whitespace characters in text nodes to a single space (U+0020).
|
|
272
272
|
|
|
@@ -292,7 +292,7 @@ Reduce a sequence of whitespace characters in text nodes to a single space (U+00
|
|
|
292
292
|
<details>
|
|
293
293
|
<summary><strong>Destroy whole whitespace</strong></summary>
|
|
294
294
|
|
|
295
|
-
> **Applies to:** any element except [whitespace sensitive](./src/spec/tag/whitespace.rs), [content](src/spec/tag/whitespace.rs), [content-first](./src/spec/tag/whitespace.rs), and [formatting](./src/spec/tag/whitespace.rs) elements.
|
|
295
|
+
> **Applies to:** any element except [whitespace sensitive](./minify-html-common/src/spec/tag/whitespace.rs), [content](src/spec/tag/whitespace.rs), [content-first](./minify-html-common/src/spec/tag/whitespace.rs), and [formatting](./minify-html-common/src/spec/tag/whitespace.rs) elements.
|
|
296
296
|
|
|
297
297
|
Remove any text nodes between tags that only consist of whitespace characters.
|
|
298
298
|
|
|
@@ -320,7 +320,7 @@ Remove any text nodes between tags that only consist of whitespace characters.
|
|
|
320
320
|
<details>
|
|
321
321
|
<summary><strong>Trim whitespace</strong></summary>
|
|
322
322
|
|
|
323
|
-
> **Applies to:** any element except [whitespace sensitive](./src/spec/tag/whitespace.rs) and [formatting](./src/spec/tag/whitespace.rs) elements.
|
|
323
|
+
> **Applies to:** any element except [whitespace sensitive](./minify-html-common/src/spec/tag/whitespace.rs) and [formatting](./minify-html-common/src/spec/tag/whitespace.rs) elements.
|
|
324
324
|
|
|
325
325
|
Remove any leading/trailing whitespace from any leading/trailing text nodes of a tag.
|
|
326
326
|
|
|
@@ -351,10 +351,10 @@ minify-html assumes HTML and SVG elements are used in specific ways, based on st
|
|
|
351
351
|
|
|
352
352
|
|Group|Elements|Expected children|
|
|
353
353
|
|---|---|---|
|
|
354
|
-
|Formatting|`a`, `strong`, [and others](./
|
|
355
|
-
|Content|`h1`, `p`, [and others](
|
|
356
|
-
|Layout|`div`, `ul`, [and others](./
|
|
357
|
-
|Content-first|`label`, `li`, [and others](./
|
|
354
|
+
|Formatting|`a`, `strong`, [and others](./minify-html-common/src/spec/tag/whitespace.rs)|Formatting elements, text.|
|
|
355
|
+
|Content|`h1`, `p`, [and others](./minify-html-common/src/spec/tag/whitespace.rs)|Formatting elements, text.|
|
|
356
|
+
|Layout|`div`, `ul`, [and others](./minify-html-common/src/spec/tag/whitespace.rs)|Layout elements, content elements.|
|
|
357
|
+
|Content-first|`label`, `li`, [and others](./minify-html-common/src/spec/tag/whitespace.rs)|Like content but could be layout with only one child.|
|
|
358
358
|
|
|
359
359
|
<details>
|
|
360
360
|
<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.11.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wilson Lin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fiddle
|