minify_html 0.9.0 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 697e2591534633035e8aab9afb878292c2e9caad26d82bbdeadb31a03452f95d
4
- data.tar.gz: 75a99b0c3ff75e820f7b88b7ba9ff5337baea5c6fc1ecccb61fd688f2246db62
3
+ metadata.gz: 3ff0294505311b161e3313747e55a9a42bd038d227a7f3bd8ebc88862d73c83e
4
+ data.tar.gz: 3240a882f00221cad615eee0a408f5fb78461a406ec958506afeb5559889795a
5
5
  SHA512:
6
- metadata.gz: a5c91b1af108805b305dfe34c802efe1c9d8ded33baf3bfe4cbcf986f09d374f39cab04128c2ca01312ccff0db59016777273a0dffc8f1e7d652d70a1cfe4c7d
7
- data.tar.gz: 3d09e35ac095b2d3c8f344a193782d80636e3bf238ed50e81a2c54bbd5fdf28d211338525ba3dcf9aa7b9a54fe4332f17beeb3475a597e8b8ad0b6836fa764dd
6
+ metadata.gz: fc42bcc925172df09ff0ca07554d894583aae99e93185d7b85459b9a3e5fbd85bdee5de28fab69c2a65f8fa9332e430e35d0a18395a8dde9c15343c8ca435599
7
+ data.tar.gz: 8613dd3f891feb8bd720402de51c37feea43f8bcbd817bb7fcdba0bf5e903d51b17969cad7d9a8479a944ee97d84dc18f29fec4a314e6ac18fffbb444c00a8ca
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.9.0/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.9.0/core/average-sizes.png">
26
+ <img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.10.0/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.10.0/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,11 +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.9.0-linux-x86_64) |
40
- [Linux ARM64](https://wilsonl.in/minify-html/bin/0.9.0-linux-arm64) |
41
- [macOS x64](https://wilsonl.in/minify-html/bin/0.9.0-macos-x86_64) |
42
- [macOS ARM64](https://wilsonl.in/minify-html/bin/0.9.0-macos-arm64) |
43
- [Windows x64](https://wilsonl.in/minify-html/bin/0.9.0-windows-x86_64.exe)
39
+ [Linux x64](https://wilsonl.in/minify-html/bin/0.10.0-linux-x86_64) |
40
+ [Linux ARM64](https://wilsonl.in/minify-html/bin/0.10.0-linux-arm64) |
41
+ [macOS x64](https://wilsonl.in/minify-html/bin/0.10.0-macos-x86_64) |
42
+ [Windows x64](https://wilsonl.in/minify-html/bin/0.10.0-windows-x86_64.exe)
44
43
 
45
44
  ### Use
46
45
 
@@ -50,6 +49,12 @@ Use the `--help` argument for more details.
50
49
  minify-html --output /path/to/output.min.html --keep-closing-tags --minify-css /path/to/src.html
51
50
  ```
52
51
 
52
+ To quickly parallel process a batch of files in place:
53
+
54
+ ```bash
55
+ minify-html --keep-closing-tags --minify-css /path/to/**/*.html
56
+ ```
57
+
53
58
  </details>
54
59
 
55
60
  <details>
@@ -59,7 +64,7 @@ minify-html --output /path/to/output.min.html --keep-closing-tags --minify-css /
59
64
 
60
65
  ```toml
61
66
  [dependencies]
62
- minify-html = { version = "0.9.0" }
67
+ minify-html = "0.10.0"
63
68
  ```
64
69
 
65
70
  ### Use
@@ -71,14 +76,14 @@ Check out the [docs](https://docs.rs/minify-html) for API and usage examples.
71
76
  <details>
72
77
  <summary><img width="24" src="https://wilsonl.in/minify-html/icon/deno.png"> <strong>Deno</strong></summary>
73
78
 
74
- - Package: https://wilsonl.in/minify-html/deno/0.9.0/index.js
79
+ - Package: https://wilsonl.in/minify-html/deno/0.10.0/index.js
75
80
  - Binding: [WASM](https://webassembly.org/)
76
81
  - Platforms: All
77
82
 
78
83
  ### Use
79
84
 
80
85
  ```ts
81
- import init, {minify} from "https://wilsonl.in/minify-html/deno/0.9.0/index.js";
86
+ import init, {minify} from "https://wilsonl.in/minify-html/deno/0.10.0/index.js";
82
87
 
83
88
  const encoder = new TextEncoder();
84
89
  const decoder = new TextDecoder();
@@ -97,7 +102,7 @@ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.htm
97
102
 
98
103
  - Package: [@minify-html/node](https://www.npmjs.com/package/@minify-html/node)
99
104
  - Binding: [Neon](https://github.com/neon-bindings/neon)
100
- - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Node.js 8.6.0 and higher
105
+ - Platforms: Linux (ARM64 and x64), macOS (x64), Windows (x64); Node.js 8.6.0 and higher
101
106
 
102
107
  ### Get
103
108
 
@@ -118,10 +123,11 @@ yarn add @minify-html/node
118
123
  TypeScript definitions are available.
119
124
 
120
125
  ```ts
126
+ import { Buffer } from "node:buffer";
121
127
  import * as minifyHtml from "@minify-html/node";
122
128
  // Or `const minifyHtml = require("@minify-html/node")` if not using TS/ESM.
123
129
 
124
- const minified = minifyHtml.minify("<p> Hello, world! </p>", { keep_spaces_between_attributes: true, keep_comments: true });
130
+ const minified = minifyHtml.minify(Buffer.from("<p> Hello, world! </p>"), { keep_spaces_between_attributes: true, keep_comments: true });
125
131
  ```
126
132
 
127
133
  All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available as snake_case properties on the object provided as the second argument; if any are not set, they default to `false`.
@@ -143,7 +149,7 @@ Add as a Maven dependency:
143
149
  <dependency>
144
150
  <groupId>in.wilsonl.minifyhtml</groupId>
145
151
  <artifactId>minify-html</artifactId>
146
- <version>0.9.0</version>
152
+ <version>0.10.0</version>
147
153
  </dependency>
148
154
  ```
149
155
 
@@ -170,7 +176,7 @@ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.htm
170
176
 
171
177
  - Package: [minify-html](https://pypi.org/project/minify-html)
172
178
  - Binding: [PyO3](https://github.com/PyO3/pyo3)
173
- - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Python 3.8 to 3.10
179
+ - Platforms: Linux (ARM64 and x64), macOS (x64), Windows (x64); Python 3.8 to 3.10
174
180
 
175
181
  ### Get
176
182
 
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.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilson Lin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiddle