react-webpacker 1.2.0 → 1.2.1
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/Gemfile.lock +44 -44
- data/lib/react-webpacker/version.rb +1 -1
- data/package.json +1 -1
- data/src/react-webpacker.js +16 -14
- 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: a88aee2b53af7bf51383cc356b928ea91f1c3e7822a9e45ab054c5b851487597
|
4
|
+
data.tar.gz: a0feaa48ed2bcd1e52dd8bbf3a7154ea89c6df4e09ebce054642fae169e00ff8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92371962fe1435513a48561cc476fc91fa06270db3a291b9bf345b71b157e724d7ea21ed4136c27e08193d6e053679312284c3eaa2275cc339f44e9848bc9f30
|
7
|
+
data.tar.gz: 30eb61a9ca6cd89381bfb7a0dffcc3d30728ecb335397b37e3a950452cf4a32044e6f0d3bfac6173e179f7b1db542914c2f38e2fb06157b38dd5ef8297ba16d0
|
data/Gemfile.lock
CHANGED
@@ -1,59 +1,59 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
react-webpacker (1.
|
4
|
+
react-webpacker (1.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
actioncable (5.1.
|
10
|
-
actionpack (= 5.1.
|
9
|
+
actioncable (5.1.5)
|
10
|
+
actionpack (= 5.1.5)
|
11
11
|
nio4r (~> 2.0)
|
12
12
|
websocket-driver (~> 0.6.1)
|
13
|
-
actionmailer (5.1.
|
14
|
-
actionpack (= 5.1.
|
15
|
-
actionview (= 5.1.
|
16
|
-
activejob (= 5.1.
|
13
|
+
actionmailer (5.1.5)
|
14
|
+
actionpack (= 5.1.5)
|
15
|
+
actionview (= 5.1.5)
|
16
|
+
activejob (= 5.1.5)
|
17
17
|
mail (~> 2.5, >= 2.5.4)
|
18
18
|
rails-dom-testing (~> 2.0)
|
19
|
-
actionpack (5.1.
|
20
|
-
actionview (= 5.1.
|
21
|
-
activesupport (= 5.1.
|
19
|
+
actionpack (5.1.5)
|
20
|
+
actionview (= 5.1.5)
|
21
|
+
activesupport (= 5.1.5)
|
22
22
|
rack (~> 2.0)
|
23
23
|
rack-test (>= 0.6.3)
|
24
24
|
rails-dom-testing (~> 2.0)
|
25
25
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
26
|
-
actionview (5.1.
|
27
|
-
activesupport (= 5.1.
|
26
|
+
actionview (5.1.5)
|
27
|
+
activesupport (= 5.1.5)
|
28
28
|
builder (~> 3.1)
|
29
29
|
erubi (~> 1.4)
|
30
30
|
rails-dom-testing (~> 2.0)
|
31
31
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
32
|
-
activejob (5.1.
|
33
|
-
activesupport (= 5.1.
|
32
|
+
activejob (5.1.5)
|
33
|
+
activesupport (= 5.1.5)
|
34
34
|
globalid (>= 0.3.6)
|
35
|
-
activemodel (5.1.
|
36
|
-
activesupport (= 5.1.
|
37
|
-
activerecord (5.1.
|
38
|
-
activemodel (= 5.1.
|
39
|
-
activesupport (= 5.1.
|
35
|
+
activemodel (5.1.5)
|
36
|
+
activesupport (= 5.1.5)
|
37
|
+
activerecord (5.1.5)
|
38
|
+
activemodel (= 5.1.5)
|
39
|
+
activesupport (= 5.1.5)
|
40
40
|
arel (~> 8.0)
|
41
|
-
activesupport (5.1.
|
41
|
+
activesupport (5.1.5)
|
42
42
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
43
43
|
i18n (~> 0.7)
|
44
44
|
minitest (~> 5.1)
|
45
45
|
tzinfo (~> 1.1)
|
46
46
|
arel (8.0.0)
|
47
47
|
builder (3.2.3)
|
48
|
-
byebug (10.0.
|
48
|
+
byebug (10.0.1)
|
49
49
|
concurrent-ruby (1.0.5)
|
50
50
|
crass (1.0.3)
|
51
|
-
erubi (1.7.
|
51
|
+
erubi (1.7.1)
|
52
52
|
globalid (0.4.1)
|
53
53
|
activesupport (>= 4.2.0)
|
54
|
-
i18n (0.9.
|
54
|
+
i18n (0.9.5)
|
55
55
|
concurrent-ruby (~> 1.0)
|
56
|
-
loofah (2.
|
56
|
+
loofah (2.2.2)
|
57
57
|
crass (~> 1.0.2)
|
58
58
|
nokogiri (>= 1.5.9)
|
59
59
|
mail (2.7.0)
|
@@ -62,38 +62,38 @@ GEM
|
|
62
62
|
mini_mime (1.0.0)
|
63
63
|
mini_portile2 (2.3.0)
|
64
64
|
minitest (5.11.3)
|
65
|
-
nio4r (2.
|
65
|
+
nio4r (2.3.0)
|
66
66
|
nokogiri (1.8.2)
|
67
67
|
mini_portile2 (~> 2.3.0)
|
68
68
|
rack (2.0.4)
|
69
|
-
rack-proxy (0.6.
|
69
|
+
rack-proxy (0.6.4)
|
70
70
|
rack
|
71
|
-
rack-test (0.8.
|
71
|
+
rack-test (0.8.3)
|
72
72
|
rack (>= 1.0, < 3)
|
73
|
-
rails (5.1.
|
74
|
-
actioncable (= 5.1.
|
75
|
-
actionmailer (= 5.1.
|
76
|
-
actionpack (= 5.1.
|
77
|
-
actionview (= 5.1.
|
78
|
-
activejob (= 5.1.
|
79
|
-
activemodel (= 5.1.
|
80
|
-
activerecord (= 5.1.
|
81
|
-
activesupport (= 5.1.
|
73
|
+
rails (5.1.5)
|
74
|
+
actioncable (= 5.1.5)
|
75
|
+
actionmailer (= 5.1.5)
|
76
|
+
actionpack (= 5.1.5)
|
77
|
+
actionview (= 5.1.5)
|
78
|
+
activejob (= 5.1.5)
|
79
|
+
activemodel (= 5.1.5)
|
80
|
+
activerecord (= 5.1.5)
|
81
|
+
activesupport (= 5.1.5)
|
82
82
|
bundler (>= 1.3.0)
|
83
|
-
railties (= 5.1.
|
83
|
+
railties (= 5.1.5)
|
84
84
|
sprockets-rails (>= 2.0.0)
|
85
85
|
rails-dom-testing (2.0.3)
|
86
86
|
activesupport (>= 4.2.0)
|
87
87
|
nokogiri (>= 1.6)
|
88
|
-
rails-html-sanitizer (1.0.
|
89
|
-
loofah (~> 2.
|
90
|
-
railties (5.1.
|
91
|
-
actionpack (= 5.1.
|
92
|
-
activesupport (= 5.1.
|
88
|
+
rails-html-sanitizer (1.0.4)
|
89
|
+
loofah (~> 2.2, >= 2.2.2)
|
90
|
+
railties (5.1.5)
|
91
|
+
actionpack (= 5.1.5)
|
92
|
+
activesupport (= 5.1.5)
|
93
93
|
method_source
|
94
94
|
rake (>= 0.8.7)
|
95
95
|
thor (>= 0.18.1, < 2.0)
|
96
|
-
rake (12.3.
|
96
|
+
rake (12.3.1)
|
97
97
|
sprockets (3.7.1)
|
98
98
|
concurrent-ruby (~> 1.0)
|
99
99
|
rack (> 1, < 3)
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
thread_safe (0.3.6)
|
106
106
|
tzinfo (1.2.5)
|
107
107
|
thread_safe (~> 0.1)
|
108
|
-
webpacker (3.
|
108
|
+
webpacker (3.4.1)
|
109
109
|
activesupport (>= 4.2)
|
110
110
|
rack-proxy (>= 0.6.1)
|
111
111
|
railties (>= 4.2)
|
data/package.json
CHANGED
data/src/react-webpacker.js
CHANGED
@@ -3,20 +3,22 @@ import ReactDOM from 'react-dom'
|
|
3
3
|
|
4
4
|
export default {
|
5
5
|
render() {
|
6
|
-
document.querySelectorAll('div[data-component-name]').forEach(
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
Array.from(document.querySelectorAll('div[data-component-name]')).forEach(
|
7
|
+
dom => {
|
8
|
+
const componentName = dom.getAttribute('data-component-name')
|
9
|
+
const component = window[componentName]
|
10
|
+
if (!component)
|
11
|
+
return console.error(
|
12
|
+
`Component ${componentName} is not defined in window scope`
|
13
|
+
)
|
14
|
+
ReactDOM.render(
|
15
|
+
React.createElement(
|
16
|
+
component,
|
17
|
+
JSON.parse(dom.getAttribute('data-props') || {})
|
18
|
+
),
|
19
|
+
dom
|
12
20
|
)
|
13
|
-
|
14
|
-
|
15
|
-
component,
|
16
|
-
JSON.parse(dom.getAttribute('data-props') || {})
|
17
|
-
),
|
18
|
-
dom
|
19
|
-
)
|
20
|
-
})
|
21
|
+
}
|
22
|
+
)
|
21
23
|
}
|
22
24
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react-webpacker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- euxn23
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: euxn23@gmail.com
|