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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1caffe6030b630477a348d3ec79ff73b6f67b1abbab3caff22a7cba2252da378
4
- data.tar.gz: 29c61e146de8f1ca6084879d6dbf50168fbc9cf7cd5019f22699df3a2f2bf751
3
+ metadata.gz: 7bb6f0f8e73f9613317562e0a3daf1fa0b9d67f21bb659759d67b65f0cecf573
4
+ data.tar.gz: 33dab007c631e2f7fbe465c104185c900a7b05c33eaffe837ed77aad70e04599
5
5
  SHA512:
6
- metadata.gz: 13bb7e4921171a136092018227b8b77a3d64599844c19cc7f6e835f9f47a3b5776660c49c13bffadbc68409b10fb7d6eb559f6c650f152d67f18e2650f1e9db2
7
- data.tar.gz: 1e0b9c28914954a37a2dabc64544f876c7ab718408a8942d5aeff5781e4625002bb730e9707a768e5aca0f28b0fa9ca83397b5cb9b3154cfcf3c1b53b7d74941
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.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.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.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.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.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
- // `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.2</version>
150
154
  </dependency>
151
155
  ```
152
156
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilson Lin