humid 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/lib/humid/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d6b6ec66d3f61678381e5f6733db579618f56460a4aefc297219428ec6a112b
|
4
|
+
data.tar.gz: 7581d1a9107fa247494f185116e0ee5773ed0dc3e79cefaca7ff771a6ed9be12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec2d956eb06a761e5bb23563165500f014e86cb64a6ef0be9d816c4a5f3f4faeea7f9c9860ac10acc571ca1c355270f62ff578165b5a546e9413dfe41dcc92e3
|
7
|
+
data.tar.gz: 7593b70d6e439688002385bba8c555f7f12876f107cd982df26617f753afb4fb55d22e12aa0ec1d169876245bd44fe101a54767ec999e98413bc6f3c9c59377c
|
data/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# Humid
|
2
|
-
|
3
|
-
Humid is a lightweight helper that leans on [mini_racer] and [webpacker] to
|
4
|
-
generate Server Side Rendered (SSR) pages from your javascript application.
|
5
|
-
|
6
2
|
[![Build
|
7
3
|
Status](https://circleci.com/gh/thoughtbot/humid.svg?style=shield)](https://circleci.com/gh/thoughtbot/humid)
|
8
4
|
|
5
|
+
Humid is a lightweight wrapper around [mini_racer] and [webpacker] used to
|
6
|
+
generate Server Side Rendered (SSR) pages from your javascript application.
|
7
|
+
While it was built for React, it can work with any JS function that returns a
|
8
|
+
HTML string.
|
9
|
+
|
9
10
|
## Caution
|
10
11
|
|
11
12
|
This project is in its early phases of development. Its interface,
|
@@ -72,6 +73,8 @@ require("source-map-support").install({
|
|
72
73
|
|
73
74
|
## The mini_racer environment.
|
74
75
|
|
76
|
+
### Functions not available
|
77
|
+
|
75
78
|
The following functions are **not** available in the mini_racer environment
|
76
79
|
|
77
80
|
- `setTimeout`
|
@@ -91,6 +94,8 @@ You may need webpacker to create aliases for server friendly libraries that can
|
|
91
94
|
not detect the `mini_racer` environment.
|
92
95
|
|
93
96
|
```diff
|
97
|
+
// config/webpack/development.js
|
98
|
+
|
94
99
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
95
100
|
|
96
101
|
const environment = require('./environment')
|
@@ -136,6 +141,12 @@ And finally call `render` from ERB.
|
|
136
141
|
<%= Humid.render(initial_state) %>
|
137
142
|
```
|
138
143
|
|
144
|
+
Instrumentation is included:
|
145
|
+
|
146
|
+
```
|
147
|
+
Completed 200 OK in 14ms (Views: 0.2ms | Humid SSR: 11.0ms | ActiveRecord: 2.7ms)
|
148
|
+
```
|
149
|
+
|
139
150
|
### Puma
|
140
151
|
|
141
152
|
`mini_racer` is thread safe, but not fork safe. To use with web servers that
|
data/lib/humid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: humid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johny Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: webpacker
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '6.
|
47
|
+
version: '6.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '6.
|
54
|
+
version: '6.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '6.
|
103
|
+
version: '6.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '6.
|
110
|
+
version: '6.0'
|
111
111
|
description: Javascript SSR rendering for Rails
|
112
112
|
email: jho406@gmail.com
|
113
113
|
executables: []
|