react_component 0.0.1 → 0.0.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 326ea9b40a4a9701bac490b9ff6b20e357e21aaa
|
4
|
+
data.tar.gz: fdfefbf10ce9738738abffeef83bee28231949a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 293745ed4e10f9ce37807d2ae4710786d7587d5c6d7277556c62682a0d7dab72d25429f568b20dcd1139058818f9af10809814fae382f8ce22a8709603136d29
|
7
|
+
data.tar.gz: 46d9f01639f70092396511fc16c28c0313d3695203400d0e3a3867f7bed8a5d4f1e5847c0bd9a3983fe3a942ae67878c7663cab2f963d7168105689e880c9919
|
@@ -0,0 +1,18 @@
|
|
1
|
+
@ReactComponent = (definition) ->
|
2
|
+
old_render = definition.render
|
3
|
+
new_render = ->
|
4
|
+
fun = old_render.toString()
|
5
|
+
chunks = fun.split("{")
|
6
|
+
|
7
|
+
for key, value of React.DOM
|
8
|
+
unless key == 'var'
|
9
|
+
chunks[1] = "var #{key} = React.DOM['#{key}'];\n" + chunks[1]
|
10
|
+
|
11
|
+
fun = chunks.join("{")
|
12
|
+
|
13
|
+
eval("(#{fun}).call(this);")
|
14
|
+
|
15
|
+
definition.render = new_render
|
16
|
+
|
17
|
+
React.createClass definition
|
18
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hubert Łępicki, Marcin Nieborak
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- lib/react_component/sprockets.rb
|
54
54
|
- lib/react_component/version.rb
|
55
55
|
- lib/tasks/react_component_tasks.rake
|
56
|
+
- vendor/assets/javascripts/react_component.js.coffee
|
56
57
|
homepage: http://github.com/amberbit/react_component
|
57
58
|
licenses:
|
58
59
|
- MIT
|