This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +59
-5
lines changed Expand file tree Collapse file tree 7 files changed +59
-5
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ source 'https://rubygems.org'
2
2
3
3
gem 'react.rb' , :path => '../..'
4
4
gem 'sinatra'
5
- gem 'opal-jquery'
5
+ gem 'opal-jquery'
6
+ gem 'react-source'
Original file line number Diff line number Diff line change
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ react.rb (0.0.1 )
5
+ opal (~> 0.6.0 )
6
+ opal-activesupport
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ hike (1.2.3 )
12
+ json (1.8.2 )
13
+ multi_json (1.10.1 )
14
+ opal (0.6.3 )
15
+ source_map
16
+ sprockets
17
+ opal-activesupport (0.1.0 )
18
+ opal (>= 0.5.0 , < 1.0.0 )
19
+ opal-jquery (0.2.0 )
20
+ opal (>= 0.5.0 , < 1.0.0 )
21
+ rack (1.6.0 )
22
+ rack-protection (1.5.3 )
23
+ rack
24
+ react-source (0.12.2 )
25
+ sinatra (1.4.5 )
26
+ rack (~> 1.4 )
27
+ rack-protection (~> 1.4 )
28
+ tilt (~> 1.3 , >= 1.3.4 )
29
+ source_map (3.0.1 )
30
+ json
31
+ sprockets (2.12.3 )
32
+ hike (~> 1.2 )
33
+ multi_json (~> 1.0 )
34
+ rack (~> 1.0 )
35
+ tilt (~> 1.1 , != 1.3.0 )
36
+ tilt (1.4.1 )
37
+
38
+ PLATFORMS
39
+ ruby
40
+
41
+ DEPENDENCIES
42
+ opal-jquery
43
+ react-source
44
+ react.rb !
45
+ sinatra
Original file line number Diff line number Diff line change 2
2
require 'bundler'
3
3
Bundler . require
4
4
5
+ require "react/source"
6
+
5
7
Opal ::Processor . source_map_enabled = true
6
8
7
9
opal = Opal ::Server . new { |s |
8
10
s . append_path './'
11
+ s . append_path File . dirname ( ::React ::Source . bundled_path_for ( "react-with-addons.js" ) )
9
12
s . main = 'example'
10
13
s . debug = true
11
14
}
@@ -37,9 +40,9 @@ get '/' do
37
40
< head >
38
41
< title > Hello React</ title >
39
42
< link rel ="stylesheet " href ="base.css " />
40
- < script src ="http://cdnjs.cloudflare.com/ajax/libs/react/0.12.2/react.js "> </ script >
41
43
< script src ="https://code.jquery.com/jquery-2.1.3.min.js "> </ script >
42
44
< script src ="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js "> </ script >
45
+ < script src ="/assets/react-with-addons.min.js "> </ script >
43
46
< script src ="/assets/example.js "> </ script >
44
47
</ head >
45
48
< body >
@@ -49,4 +52,4 @@ get '/' do
49
52
HTML
50
53
end
51
54
52
- run Sinatra ::Application
55
+ run Sinatra ::Application
Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ gem 'opal-haml', :github => 'opal/opal-haml'
8
8
gem 'opal-rspec' , '0.3.0.beta2'
9
9
gem 'react.rb' , :path => "../.."
10
10
gem 'thin'
11
+ gem 'react-source'
Original file line number Diff line number Diff line change 55
55
opal (>= 0.6.0 , < 1.0.0 )
56
56
rack (1.5.2 )
57
57
rake (10.1.1 )
58
+ react-source (0.12.2 )
58
59
source_map (3.0.1 )
59
60
json
60
61
sprockets (2.12.3 )
@@ -77,6 +78,7 @@ DEPENDENCIES
77
78
opal-jquery !
78
79
opal-rspec (= 0.3.0.beta2 )
79
80
rake
81
+ react-source
80
82
react.rb !
81
83
thin
82
84
vienna !
Original file line number Diff line number Diff line change 1
1
require 'bundler'
2
2
Bundler . require
3
3
4
+ require "react/source"
5
+
4
6
run Opal ::Server . new { |s |
5
7
s . append_path 'app'
6
8
s . append_path 'vendor'
9
+ s . append_path File . dirname ( ::React ::Source . bundled_path_for ( "react-with-addons.js" ) )
7
10
8
11
s . debug = true
9
12
s . main = 'application'
Original file line number Diff line number Diff line change 3
3
%head
4
4
%meta (charset ="utf-8" )
5
5
%meta (http-equiv ="X-UA-Compatible" content ="IE=edge,chrome=1" )
6
- %script {:type => " text/javascript" ,
7
- :src => " http://fb.me/react-with-addons-0.12.2.min.js" }
8
6
%link (rel ="stylesheet" href ="/vendor/base.css" )
7
+ = javascript_include_tag 'react-with-addons.min.js'
9
8
= javascript_include_tag 'application'
10
9
11
10
%body
You can’t perform that action at this time.
0 commit comments