minify_html 0.7.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbc56649fbd4a709c74fea7eb0622560f5f46cab736dee5844b2e8b35eeb8fc4
4
- data.tar.gz: 7851e432ab1b89c8e90c6d63c6864babaf62b16a393f518ee926cbdebbcd1b51
3
+ metadata.gz: 6bc8401af7a04165e3c1cdd787007268cd1c811dbd77f642a054f695b5437e38
4
+ data.tar.gz: 28c972708225d63ca43c8fad3c8bb9f34140723b379055191c4e2b5e4777065b
5
5
  SHA512:
6
- metadata.gz: e8b8fdf42147f60225a4ead898c4985ba903c5c104ac7f1aa6282a685264b756f961925bdeeb2f191be28e4c450d036e7c84aea839f666d7338e2964b52965d4
7
- data.tar.gz: ca00036a8935a3f080e65144e37fe95e331bfaa082558fc36408b617e732671c83308ee7e9d5a367fe8b2eb427871fbb5fdb41bc8c6844e31e7564e803105449
6
+ metadata.gz: 57d7d0f918845434fa87d1a4bd6e3be213c728675d47c0497b287db03848d2ee7d3d9983e8a545ed609e8d78106180f23711b39cbcc06cefab9fde4d654adb73
7
+ data.tar.gz: c211d279be14231b51df32c389e4391221d5d99609be48ba301132b0c7214a880d4abae9e85016fde68dc6a4aae7c82d7b7c6deb0b2ea4845c8cb27a7c06336d
data/README.md CHANGED
@@ -19,11 +19,11 @@ 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.7.0/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.7.0/core/average-sizes.png">
22
+ <img width="400" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.7.1/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.7.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
 
26
- ## Usage
26
+ ## Compatibility and usage
27
27
 
28
28
  <details>
29
29
  <summary><img width="24" src="https://wilsonl.in/minify-html/icon/cli.png"> <strong>CLI</strong></summary>
@@ -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.7.0-linux-x86_64) |
36
- [Linux ARM](https://wilsonl.in/minify-html/bin/0.7.0-linux-arm64) |
37
- [macOS x64](https://wilsonl.in/minify-html/bin/0.7.0-macos-x86_64) |
38
- [macOS ARM64](https://wilsonl.in/minify-html/bin/0.7.0-macos-arm64) |
39
- [Windows x64](https://wilsonl.in/minify-html/bin/0.7.0-windows-x86_64.exe)
35
+ [Linux x64](https://wilsonl.in/minify-html/bin/0.7.1-linux-x86_64) |
36
+ [Linux ARM64](https://wilsonl.in/minify-html/bin/0.7.1-linux-arm64) |
37
+ [macOS x64](https://wilsonl.in/minify-html/bin/0.7.1-macos-x86_64) |
38
+ [macOS ARM64](https://wilsonl.in/minify-html/bin/0.7.1-macos-arm64) |
39
+ [Windows x64](https://wilsonl.in/minify-html/bin/0.7.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.7.0", features = ["js-esbuild"] }
58
+ minify-html = { version = "0.7.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).
@@ -91,24 +91,18 @@ yarn add @minify-html/js
91
91
 
92
92
  ### Use
93
93
 
94
- ```js
95
- const minifyHtml = require("@minify-html/js");
96
-
97
- // Refer to TypeScript definitions for details.
98
- const cfg = minifyHtml.createConfiguration({ keep_closing_tags: true, remove_bangs: false });
99
- const minified = minifyHtml.minify("<p> Hello, world! </p>", cfg);
100
- ```
101
-
102
- minify-html is also available for TypeScript:
94
+ TypeScript definitions are available.
103
95
 
104
96
  ```ts
105
97
  import * as minifyHtml from "@minify-html/js";
106
- import * as fs from "fs";
98
+ // Or `const minifyHtml = require("@minify-html/js")` if not using TS/ESM.
107
99
 
108
100
  const cfg = minifyHtml.createConfiguration({ keep_spaces_between_attributes: true, keep_comments: true });
109
101
  const minified = minifyHtml.minify("<p> Hello, world! </p>", cfg);
110
102
  ```
111
103
 
104
+ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available as snake_case properties on the object provided to `createConfiguration`; if any are not set, they default to `false`.
105
+
112
106
  </details>
113
107
 
114
108
  <details>
@@ -126,7 +120,7 @@ Add as a Maven dependency:
126
120
  <dependency>
127
121
  <groupId>in.wilsonl.minifyhtml</groupId>
128
122
  <artifactId>minify-html</artifactId>
129
- <version>0.7.0</version>
123
+ <version>0.7.1</version>
130
124
  </dependency>
131
125
  ```
132
126
 
@@ -144,6 +138,8 @@ Configuration cfg = new Configuration.Builder()
144
138
  String minified = MinifyHtml.minify("<p> Hello, world! </p>", cfg);
145
139
  ```
146
140
 
141
+ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available as camelCase setter methods on the `Builder`; if any are not set, they default to `false`.
142
+
147
143
  </details>
148
144
 
149
145
  <details>
@@ -165,6 +161,8 @@ import minify_html
165
161
  minified = minify_html.minify("<p> Hello, world! </p>", minify_js=True, remove_processing_instructions=True)
166
162
  ```
167
163
 
164
+ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available as Python keyword arguments; if any are omitted, they default to `False`.
165
+
168
166
  </details>
169
167
 
170
168
  <details>
@@ -186,6 +184,8 @@ require 'minify_html'
186
184
  print MinifyHtml.minify("<p> Hello, world! </p>", { :keep_spaces_between_attributes => true, :minify_js => true })
187
185
  ```
188
186
 
187
+ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.html) are available; if any are omitted, they default to `false`.
188
+
189
189
  </details>
190
190
 
191
191
  ## Minification
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.7.0
4
+ version: 0.7.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: 2021-11-12 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiddle