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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 233e4ef4917b2a68277fc40685618699cd5839cbb20e27506556ac3116f99a64
4
- data.tar.gz: 206e9cbedd7f030eebd9db2fc36562472b3562ce25f130c560424bc0efebf875
3
+ metadata.gz: a88aee2b53af7bf51383cc356b928ea91f1c3e7822a9e45ab054c5b851487597
4
+ data.tar.gz: a0feaa48ed2bcd1e52dd8bbf3a7154ea89c6df4e09ebce054642fae169e00ff8
5
5
  SHA512:
6
- metadata.gz: 4ee5246ff2d580f2f828d9216ee8a0d964df7e74f9c9e217100f5d700e311ff99aff2398bf42be935bb93f3799d8ac7ac1e78f8f587365434f76fa4cf123e0f2
7
- data.tar.gz: 44d746b97fd7ed82086bcc1779edcfb4bf81a8d0918c5f678a75853b69f3fb2f93e07a24afb486471a3353b07ce70e8158d91a9de8f384fd0f3d5936e3404e6d
6
+ metadata.gz: 92371962fe1435513a48561cc476fc91fa06270db3a291b9bf345b71b157e724d7ea21ed4136c27e08193d6e053679312284c3eaa2275cc339f44e9848bc9f30
7
+ data.tar.gz: 30eb61a9ca6cd89381bfb7a0dffcc3d30728ecb335397b37e3a950452cf4a32044e6f0d3bfac6173e179f7b1db542914c2f38e2fb06157b38dd5ef8297ba16d0
@@ -1,59 +1,59 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- react-webpacker (1.1.0)
4
+ react-webpacker (1.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actioncable (5.1.4)
10
- actionpack (= 5.1.4)
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.4)
14
- actionpack (= 5.1.4)
15
- actionview (= 5.1.4)
16
- activejob (= 5.1.4)
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.4)
20
- actionview (= 5.1.4)
21
- activesupport (= 5.1.4)
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.4)
27
- activesupport (= 5.1.4)
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.4)
33
- activesupport (= 5.1.4)
32
+ activejob (5.1.5)
33
+ activesupport (= 5.1.5)
34
34
  globalid (>= 0.3.6)
35
- activemodel (5.1.4)
36
- activesupport (= 5.1.4)
37
- activerecord (5.1.4)
38
- activemodel (= 5.1.4)
39
- activesupport (= 5.1.4)
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.4)
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.0)
48
+ byebug (10.0.1)
49
49
  concurrent-ruby (1.0.5)
50
50
  crass (1.0.3)
51
- erubi (1.7.0)
51
+ erubi (1.7.1)
52
52
  globalid (0.4.1)
53
53
  activesupport (>= 4.2.0)
54
- i18n (0.9.3)
54
+ i18n (0.9.5)
55
55
  concurrent-ruby (~> 1.0)
56
- loofah (2.1.1)
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.2.0)
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.3)
69
+ rack-proxy (0.6.4)
70
70
  rack
71
- rack-test (0.8.2)
71
+ rack-test (0.8.3)
72
72
  rack (>= 1.0, < 3)
73
- rails (5.1.4)
74
- actioncable (= 5.1.4)
75
- actionmailer (= 5.1.4)
76
- actionpack (= 5.1.4)
77
- actionview (= 5.1.4)
78
- activejob (= 5.1.4)
79
- activemodel (= 5.1.4)
80
- activerecord (= 5.1.4)
81
- activesupport (= 5.1.4)
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.4)
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.3)
89
- loofah (~> 2.0)
90
- railties (5.1.4)
91
- actionpack (= 5.1.4)
92
- activesupport (= 5.1.4)
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.0)
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.2.1)
108
+ webpacker (3.4.1)
109
109
  activesupport (>= 4.2)
110
110
  rack-proxy (>= 0.6.1)
111
111
  railties (>= 4.2)
@@ -1,3 +1,3 @@
1
1
  module ReactWebpacker
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-webpacker",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "The smallest, enoughly-tested library for react with webpacker.",
5
5
  "main": "src/react-webpacker.js",
6
6
  "scripts": {
@@ -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(dom => {
7
- const componentName = dom.getAttribute('data-component-name')
8
- const component = window[componentName]
9
- if (!component)
10
- return console.error(
11
- `Component ${componentName} is not defined in window scope`
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
- ReactDOM.render(
14
- React.createElement(
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.0
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-23 00:00:00.000000000 Z
11
+ date: 2018-03-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: euxn23@gmail.com