minify_html 0.3.9 → 0.4.3

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: 4bd2c89ec4f024b67cea95c499fcf8f0cac743c0b186920ea9ed0400b36d5355
4
- data.tar.gz: 2fd88803a4097495d32c026999810e36178fbb43c39af5cdf733d3e58575ba5b
3
+ metadata.gz: '08c6e3ebc5ed241d3d52aac1996f502fe3a8264d446862b491114673762f4f0e'
4
+ data.tar.gz: 18f6d0e557c9eb58adf53e6a8cb2f81b5970966327bbeffce58e75edf231a5ca
5
5
  SHA512:
6
- metadata.gz: ba97f98317f76967eb99d4ef6d4db68eeb900e2924fef550c01cee0744a60540a8b79ecf765075cf016dc16f0cfcd10ea1f4e106c5d4a5de443fb7432b8d59f9
7
- data.tar.gz: 962ea48bfd7ecdc39b42a60067c415fbadb8d2d3e7160239152052b0c250a79694afc82ccc499dba084c3cf9d497ef974b43608e2663e9f4d078b81bfb126e6a
6
+ metadata.gz: af5de734b5995beebb28d273facebb6812f67a0c8eb6c539c7d882d05dc5f2f113a00030dd8be91a18375f2ca30d07ba7d83107408b2711dfb5a14b38188690c
7
+ data.tar.gz: 96230e5fd320895870800c63f83bddff4d26eb94a9450a4ac23a92f6789b80f6f58bbd6bb947905e5532e405a0d49f42387ee979c49117bec077fc8103004d2d
data/README.md CHANGED
@@ -6,13 +6,13 @@ Comes with native bindings to Node.js, Python, Java, and Ruby.
6
6
  - Advanced minification strategy beats other minifiers with only one pass.
7
7
  - Uses zero memory allocations, SIMD searching, direct tries, and lookup tables.
8
8
  - Well tested with a large test suite and extensive [fuzzing](./fuzz).
9
- - Natively binds to [esbuild](https://github.com/wilsonzlin/esbuild-rs) for super fast JS minification.
9
+ - Natively binds to [esbuild](https://github.com/wilsonzlin/esbuild-rs) for super fast JS and CSS minification.
10
10
 
11
11
  ## Performance
12
12
 
13
13
  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)
14
14
 
15
- <img width="415" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.9/js/average-speeds.png"> <img width="415" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.3.9/js/average-sizes.png">
15
+ <img width="415" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.4.3/core/average-speeds.png"> <img width="415" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.4.3/core/average-sizes.png">
16
16
 
17
17
  ## Usage
18
18
 
@@ -22,16 +22,16 @@ Precompiled binaries are available for x86-64 Linux, macOS, and Windows.
22
22
 
23
23
  ##### Get
24
24
 
25
- [Linux](https://wilsonl.in/minify-html/bin/0.3.9-linux-x86_64) |
26
- [macOS](https://wilsonl.in/minify-html/bin/0.3.9-macos-x86_64) |
27
- [Windows](https://wilsonl.in/minify-html/bin/0.3.9-windows-x86_64.exe)
25
+ [Linux](https://wilsonl.in/minify-html/bin/0.4.3-linux-x86_64) |
26
+ [macOS](https://wilsonl.in/minify-html/bin/0.4.3-macos-x86_64) |
27
+ [Windows](https://wilsonl.in/minify-html/bin/0.4.3-windows-x86_64.exe)
28
28
 
29
29
  ##### Use
30
30
 
31
31
  Use the `--help` argument for more details.
32
32
 
33
33
  ```bash
34
- minify-html --src /path/to/src.html --out /path/to/output.min.html
34
+ minify-html --src /path/to/src.html --out /path/to/output.min.html --css --js
35
35
  ```
36
36
 
37
37
  ### API
@@ -43,12 +43,12 @@ minify-html --src /path/to/src.html --out /path/to/output.min.html
43
43
 
44
44
  ```toml
45
45
  [dependencies]
46
- minify-html = { version = "0.3.9", features = ["js-esbuild"] }
46
+ minify-html = { version = "0.4.3", features = ["js-esbuild"] }
47
47
  ```
48
48
 
49
- Building with the `js-esbuild` feature requires the Go compiler to be installed as well, to build the [JS minifier](https://github.com/wilsonzlin/esbuild-rs).
49
+ 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).
50
50
 
51
- If the `js-esbuild` feature is not enabled, `cfg.minify_js` will have no effect.
51
+ If the `js-esbuild` feature is not enabled, `cfg.minify_js` and `cfg.minify_css` will have no effect.
52
52
 
53
53
  ##### Use
54
54
 
@@ -82,7 +82,7 @@ yarn add @minify-html/js
82
82
  ```js
83
83
  const minifyHtml = require("@minify-html/js");
84
84
 
85
- const cfg = minifyHtml.createConfiguration({ minifyJs: false });
85
+ const cfg = minifyHtml.createConfiguration({ minifyJs: false, minifyCss: false });
86
86
  const minified = minifyHtml.minify("<p> Hello, world! </p>", cfg);
87
87
 
88
88
  // Alternatively, minify in place to avoid copying.
@@ -97,7 +97,7 @@ minify-html is also available for TypeScript:
97
97
  import * as minifyHtml from "@minify-html/js";
98
98
  import * as fs from "fs";
99
99
 
100
- const cfg = minifyHtml.createConfiguration({ minifyJs: false });
100
+ const cfg = minifyHtml.createConfiguration({ minifyJs: false, minifyCss: false });
101
101
  const minified = minifyHtml.minify("<p> Hello, world! </p>", cfg);
102
102
  // Or alternatively:
103
103
  const minified = minifyHtml.minifyInPlace(fs.readFileSync("source.html"), cfg);
@@ -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.3.9</version>
123
+ <version>0.4.3</version>
124
124
  </dependency>
125
125
  ```
126
126
 
@@ -133,6 +133,7 @@ import in.wilsonl.minifyhtml.SyntaxException;
133
133
 
134
134
  Configuration cfg = new Configuration.Builder()
135
135
  .setMinifyJs(false)
136
+ .setMinifyCss(false)
136
137
  .build();
137
138
 
138
139
  try {
@@ -153,7 +154,7 @@ MinifyHtml.minifyInPlace(source, cfg);
153
154
 
154
155
  - Package: [minify-html](https://pypi.org/project/minify-html)
155
156
  - Binding: [PyO3](https://github.com/PyO3/pyo3)
156
- - Platforms: Linux, macOS, Windows; Python 3.5 and higher
157
+ - Platforms: Linux, macOS, Windows; Python 3.7 and higher
157
158
 
158
159
  ##### Get
159
160
 
@@ -165,7 +166,7 @@ Add the PyPI project as a dependency and install it using `pip` or `pipenv`.
165
166
  import minify_html
166
167
 
167
168
  try:
168
- minified = minify_html.minify("<p> Hello, world! </p>", minify_js=False)
169
+ minified = minify_html.minify("<p> Hello, world! </p>", minify_js=False, minify_css=False)
169
170
  except SyntaxError as e:
170
171
  print(e)
171
172
  ```
@@ -188,7 +189,7 @@ Add the library as a dependency to `Gemfile` or `*.gemspec`.
188
189
  ```ruby
189
190
  require 'minify_html'
190
191
 
191
- print MinifyHtml.minify("<p> Hello, world! </p>", { :minify_js => false })
192
+ print MinifyHtml.minify("<p> Hello, world! </p>", { :minify_js => false, :minify_css => false })
192
193
  ```
193
194
 
194
195
  </details>
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.3.9
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilson Lin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-13 00:00:00.000000000 Z
11
+ date: 2021-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiddle
@@ -62,5 +62,5 @@ rubyforge_project:
62
62
  rubygems_version: 2.7.6.2
63
63
  signing_key:
64
64
  specification_version: 4
65
- summary: Fast and smart HTML + JS minifier
65
+ summary: Extremely fast and smart HTML + JS + CSS minifier
66
66
  test_files: []