hyperbuild 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -12
- 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 +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bb6f0f8e73f9613317562e0a3daf1fa0b9d67f21bb659759d67b65f0cecf573
|
4
|
+
data.tar.gz: 33dab007c631e2f7fbe465c104185c900a7b05c33eaffe837ed77aad70e04599
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 379e7d4f40fe1d42f0771ade0a09f9bf902aa5cfd0e6eeb6a92a7b7fb6b9da13dbe082724d6dd6485ddce9e9d85b90f8f85d68910fb83cf4a1961266c819df54
|
7
|
+
data.tar.gz: d90bc35584be1022996380f4e8a06782a8801ef94dd680f8e87677095277cbdd8b23c29cc7bf60aef427ed8795a5baec6ca9a2e08f8be1ab2997335f487932fb
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Available as:
|
|
17
17
|
|
18
18
|
Speed and effectiveness of Node.js version compared to [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on popular already-minified web pages. See [bench](./bench) folder for more details.
|
19
19
|
|
20
|
-
<img width="435" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/hyperbuild/bench/0.1.
|
20
|
+
<img width="435" alt="Chart showing speed of HTML minifiers" src="https://wilsonl.in/hyperbuild/bench/0.1.2/average-speeds.png"> <img width="435" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/hyperbuild/bench/0.1.2/average-sizes.png">
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
@@ -27,9 +27,9 @@ Precompiled binaries are available for x86-64 Windows, macOS, and Linux.
|
|
27
27
|
|
28
28
|
##### Get
|
29
29
|
|
30
|
-
[Windows](https://wilsonl.in/hyperbuild/bin/0.1.
|
31
|
-
[macOS](https://wilsonl.in/hyperbuild/bin/0.1.
|
32
|
-
[Linux](https://wilsonl.in/hyperbuild/bin/0.1.
|
30
|
+
[Windows](https://wilsonl.in/hyperbuild/bin/0.1.2-windows-x86_64.exe) |
|
31
|
+
[macOS](https://wilsonl.in/hyperbuild/bin/0.1.2-macos-x86_64) |
|
32
|
+
[Linux](https://wilsonl.in/hyperbuild/bin/0.1.2-linux-x86_64)
|
33
33
|
|
34
34
|
##### Use
|
35
35
|
|
@@ -46,37 +46,41 @@ hyperbuild --src /path/to/src.html --out /path/to/output.min.html
|
|
46
46
|
|
47
47
|
```toml
|
48
48
|
[dependencies]
|
49
|
-
hyperbuild = "0.1.
|
49
|
+
hyperbuild = "0.1.2"
|
50
50
|
```
|
51
51
|
|
52
52
|
##### Use
|
53
53
|
|
54
54
|
```rust
|
55
|
-
use hyperbuild::hyperbuild;
|
55
|
+
use hyperbuild::{FriendlyError, hyperbuild};
|
56
56
|
|
57
57
|
fn main() {
|
58
58
|
let mut code = b"<p> Hello, world! </p>".to_vec();
|
59
59
|
|
60
|
-
//
|
60
|
+
// Minifies a slice in-place and returns the new minified length,
|
61
|
+
// but leaves any original code after the minified code intact.
|
61
62
|
match hyperbuild(&mut code) {
|
62
63
|
Ok(minified_len) => {}
|
63
64
|
Err((error_type, error_position)) => {}
|
64
65
|
};
|
65
66
|
|
66
|
-
//
|
67
|
+
// Creates a vector copy containing only minified code
|
68
|
+
// instead of minifying in-place.
|
67
69
|
match hyperbuild_copy(&code) {
|
68
70
|
Ok(minified) => {}
|
69
71
|
Err((error_type, error_position)) => {}
|
70
72
|
};
|
71
73
|
|
72
|
-
//
|
74
|
+
// Minifies a vector in-place, and then truncates the
|
75
|
+
// vector to the new minified length.
|
73
76
|
match hyperbuild_truncate(&mut code) {
|
74
77
|
Ok(()) => {}
|
75
78
|
Err((error_type, error_position)) => {}
|
76
79
|
};
|
77
80
|
|
78
|
-
//
|
79
|
-
// `code_context` is a string of a visual representation of the source
|
81
|
+
// Identical to `hyperbuild` except with FriendlyError instead.
|
82
|
+
// `code_context` is a string of a visual representation of the source,
|
83
|
+
// with line numbers and position markers to aid in debugging syntax.
|
80
84
|
match hyperbuild_friendly_error(&mut code) {
|
81
85
|
Ok(minified_len) => {}
|
82
86
|
Err(FriendlyError { position, message, code_context }) => {
|
@@ -146,7 +150,7 @@ Add as a Maven dependency:
|
|
146
150
|
<dependency>
|
147
151
|
<groupId>in.wilsonl.hyperbuild</groupId>
|
148
152
|
<artifactId>hyperbuild</artifactId>
|
149
|
-
<version>0.1.
|
153
|
+
<version>0.1.2</version>
|
150
154
|
</dependency>
|
151
155
|
```
|
152
156
|
|
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
|