minify_html 0.13.3-arm64-darwin → 0.14.0-arm64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -5
- data/lib/2.7/minify_html.bundle +0 -0
- data/lib/3.0/minify_html.bundle +0 -0
- data/lib/3.1/minify_html.bundle +0 -0
- data/lib/3.2/minify_html.bundle +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4cb2169f4a42edc50f51b35e69cc7f127181908223fbc77760c10a0ea5fa2d2
|
4
|
+
data.tar.gz: e87e0fa20c79f7d860e317cf154c844cbda046f5c4d33d22eafe8cc04908d7ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 353c3bdda57f6c4e6c9c5ef4cfcdda0bb9b6af6fcc7eda35f24ba8279cdc2e865b9fc512a75070fa459f69e2e9effcec47fcfc8576260f8532820b0c6ca559bb
|
7
|
+
data.tar.gz: e39a5cc5228f621bed10a73ce13b780092ae1967f1e3d6ae703ecaa922932597c38cc47b7a4bcde8704677e7aaaf8037c0a865b61c454a432332fcff17c3a39a
|
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.14.0/core/average-speeds.png"><img width="400" alt="Chart showing compression of HTML minifiers" src="https://wilsonl.in/minify-html/bench/0.14.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
|
|
@@ -61,7 +61,7 @@ minhtml --keep-closing-tags --minify-css /path/to/**/*.html
|
|
61
61
|
|
62
62
|
```toml
|
63
63
|
[dependencies]
|
64
|
-
minify-html = "0.
|
64
|
+
minify-html = "0.14.0"
|
65
65
|
```
|
66
66
|
|
67
67
|
### Use
|
@@ -73,14 +73,14 @@ Check out the [docs](https://docs.rs/minify-html) for API and usage examples.
|
|
73
73
|
<details>
|
74
74
|
<summary><img width="24" src="https://wilsonl.in/minify-html/icon/deno.png"> <strong>Deno</strong></summary>
|
75
75
|
|
76
|
-
- Package: https://wilsonl.in/minify-html/deno/0.
|
76
|
+
- Package: https://wilsonl.in/minify-html/deno/0.14.0/index.js
|
77
77
|
- Binding: [WASM](https://webassembly.org/)
|
78
78
|
- Platforms: All
|
79
79
|
|
80
80
|
### Use
|
81
81
|
|
82
82
|
```ts
|
83
|
-
import init, {minify} from "https://wilsonl.in/minify-html/deno/0.
|
83
|
+
import init, {minify} from "https://wilsonl.in/minify-html/deno/0.14.0/index.js";
|
84
84
|
|
85
85
|
const encoder = new TextEncoder();
|
86
86
|
const decoder = new TextDecoder();
|
@@ -146,7 +146,7 @@ Add as a Maven dependency:
|
|
146
146
|
<dependency>
|
147
147
|
<groupId>in.wilsonl.minifyhtml</groupId>
|
148
148
|
<artifactId>minify-html</artifactId>
|
149
|
-
<version>0.
|
149
|
+
<version>0.14.0</version>
|
150
150
|
</dependency>
|
151
151
|
```
|
152
152
|
|
@@ -240,6 +240,14 @@ All [`Cfg` fields](https://docs.rs/minify-html/latest/minify_html/struct.Cfg.htm
|
|
240
240
|
|
241
241
|
</details>
|
242
242
|
|
243
|
+
## Templating syntax
|
244
|
+
|
245
|
+
minify-html can parse and preserve `{{`/`{%`/`{#` and `<%` syntax in the source code, which allows minification of many HTML templates written for most engines like Pebble, Mustache, Django, Go, Jinja, Twix, Nunjucks, Handlebars, Sailfish, JSP, EJS, and ERB. Look for the `preserve_*_template_syntax` Cfg options.
|
246
|
+
|
247
|
+
PHP blocks (`<?php` or `<?=`) also happen to be processing instructions, which are preserved by default.
|
248
|
+
|
249
|
+
Note that in all of these syntax, the parsing is "dumb": it will simply look for the next subsequence of characters that match the closing delimiter. This may cause issues if nesting or string literals appear inside these blocks, but this should be rare.
|
250
|
+
|
243
251
|
## Minification
|
244
252
|
|
245
253
|
Note that some of the minification done can result in HTML that will not pass validation, but remain interpreted and rendered correctly by the browser; essentially, the laxness of the browser is taken advantage of for better minification. To prevent this, refer to these configuration options:
|
data/lib/2.7/minify_html.bundle
CHANGED
Binary file
|
data/lib/3.0/minify_html.bundle
CHANGED
Binary file
|
data/lib/3.1/minify_html.bundle
CHANGED
Binary file
|
data/lib/3.2/minify_html.bundle
CHANGED
Binary file
|