hyperbuild 0.1.1 → 0.1.6
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 +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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13a9d22526cb1d6a0c8825e77e25d1d1f3a25cea41378275db3ad5e2ce1890fa
|
4
|
+
data.tar.gz: c9c4ca351f4f407fe6d6313bd06cc66518aa1263c22295bff0183ea08b023a7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf57a43baa94fbcd229c9ed36502ea3bbbe154bee6c5a7c42a0d13bf28451eec307ef844c97a3d25bb237e7dd7cec40774898e9fd34428e281f16362a745d708
|
7
|
+
data.tar.gz: be799c78e5d720b8c3d02d6960201e17e5e4680d9936cbbe664628628dd5cf5838e35fe6a996291e0355024d632e5acda13bb63d6a4cc28c95051b811911afea
|
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.6/average-speeds.png"> <img width="435" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/hyperbuild/bench/0.1.6/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.6-windows-x86_64.exe) |
|
31
|
+
[macOS](https://wilsonl.in/hyperbuild/bin/0.1.6-macos-x86_64) |
|
32
|
+
[Linux](https://wilsonl.in/hyperbuild/bin/0.1.6-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.6"
|
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.6</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
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyperbuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
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
|
+
date: 2020-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fiddle
|