hyperbuild 0.1.1 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1caffe6030b630477a348d3ec79ff73b6f67b1abbab3caff22a7cba2252da378
4
- data.tar.gz: 29c61e146de8f1ca6084879d6dbf50168fbc9cf7cd5019f22699df3a2f2bf751
3
+ metadata.gz: 13a9d22526cb1d6a0c8825e77e25d1d1f3a25cea41378275db3ad5e2ce1890fa
4
+ data.tar.gz: c9c4ca351f4f407fe6d6313bd06cc66518aa1263c22295bff0183ea08b023a7c
5
5
  SHA512:
6
- metadata.gz: 13bb7e4921171a136092018227b8b77a3d64599844c19cc7f6e835f9f47a3b5776660c49c13bffadbc68409b10fb7d6eb559f6c650f152d67f18e2650f1e9db2
7
- data.tar.gz: 1e0b9c28914954a37a2dabc64544f876c7ab718408a8942d5aeff5781e4625002bb730e9707a768e5aca0f28b0fa9ca83397b5cb9b3154cfcf3c1b53b7d74941
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.1/average-speeds.png"> <img width="435" alt="Chart showing effectiveness of HTML minifiers" src="https://wilsonl.in/hyperbuild/bench/0.1.1/average-sizes.png">
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.1-windows-x86_64.exe) |
31
- [macOS](https://wilsonl.in/hyperbuild/bin/0.1.1-macos-x86_64) |
32
- [Linux](https://wilsonl.in/hyperbuild/bin/0.1.1-linux-x86_64)
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.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
- // `hyperbuild` minifies a slice in-place and returns the new minified length, but leaves any original code after the minified code intact.
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
- // `hyperbuild_copy` creates a vector copy containing only minified code instead of minifying in-place.
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
- // `hyperbuild_truncate` minifies a vector in-place, and then truncates the vector to the new minified length.
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
- // `hyperbuild_friendly_error` is identical to `hyperbuild` except the error is a FriendlyError instead.
79
- // `code_context` is a string of a visual representation of the source code with line numbers and position markers to aid in debugging syntax issues, and should be printed.
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.1</version>
153
+ <version>0.1.6</version>
150
154
  </dependency>
151
155
  ```
152
156
 
Binary file
Binary file
Binary file
Binary file
Binary file
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.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-06-19 00:00:00.000000000 Z
11
+ date: 2020-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiddle