react-jsx 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/react/jsx.rb +12 -0
  3. metadata +86 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 139970d855f747df41cfc6ebf70a2cb596d1dbaf
4
+ data.tar.gz: ae4ce14cff1ec7a8eefdcbed9dc9a4f16f7f67ba
5
+ SHA512:
6
+ metadata.gz: 33cd4d89eddf2560e1c4bb429fade310a910cb24807e5f7718dc3e0ae438fc940de3ed0b5cfc530a24114f7295ada92c0e0436e9b0bbc8dca20ca13b966fd061
7
+ data.tar.gz: b23c9f1fea0bbcfe3fa0dac882b275c72946072a25ccd4c76d7d80b1fa93b43f3dec22ed15923c3551bb74c48e2341f4ad950927f1d19fadf0954927d27cdc8f
data/lib/react/jsx.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'execjs'
2
+ require 'react/source'
3
+
4
+ module React
5
+ module JSX
6
+ def self.compile(code)
7
+ content = File.read(React::Source.bundled_path_for('JSXTransformer.js'))
8
+ @context ||= ExecJS.compile(content)
9
+ @context.call('JSXTransformer.transform', code)['code']
10
+ end
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: react-jsx
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexey Demin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: react-source
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: execjs
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 2.14.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 2.14.0
55
+ description:
56
+ email: demin.alexey@inbox.ru
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/react/jsx.rb
62
+ homepage: https://github.com/ademin/react-jsx
63
+ licenses:
64
+ - MIT
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - '>='
73
+ - !ruby/object:Gem::Version
74
+ version: 1.9.3
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubyforge_project:
82
+ rubygems_version: 2.0.3
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: Ruby React JSX Compiler
86
+ test_files: []