This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +70
-82
lines changed Expand file tree Collapse file tree 6 files changed +70
-82
lines changed Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: ../..
3
3
specs:
4
- react.rb (0.1.0 )
4
+ react.rb (0.2.1 )
5
5
opal (~> 0.6.0 )
6
- opal-activesupport
7
- sprockets-es6
8
- therubyracer
6
+ opal-activesupport (~> 0 )
7
+ react-jsx (~> 0.8.0 )
8
+ sprockets (>= 2.2.3 , < 3.0.0 )
9
+ therubyracer (~> 0 )
9
10
10
11
GEM
11
12
remote: https://rubygems.org/
12
13
specs:
13
- babel-source (4.7.16 )
14
- babel-transpiler (0.6.0 )
15
- babel-source (>= 4.0 , < 5 )
16
- execjs (~> 2.0 )
17
- execjs (2.4.0 )
14
+ execjs (2.5.2 )
15
+ hike (1.2.3 )
18
16
json (1.8.2 )
19
17
libv8 (3.16.14.7 )
18
+ multi_json (1.11.0 )
20
19
opal (0.6.3 )
21
20
source_map
22
21
sprockets
29
28
rack (1.6.0 )
30
29
rack-protection (1.5.3 )
31
30
rack
32
- react-source (0.12.2 )
31
+ react-jsx (0.8.0 )
32
+ execjs (>= 2.0.2 )
33
+ json (>= 1.8.0 )
34
+ react-source (>= 0.4.1 )
35
+ react-source (0.13.2 )
33
36
ref (1.0.5 )
34
- sinatra (1.4.5 )
37
+ sinatra (1.4.6 )
35
38
rack (~> 1.4 )
36
39
rack-protection (~> 1.4 )
37
- tilt (~> 1.3 , >= 1.3.4 )
40
+ tilt (>= 1.3 , < 3 )
38
41
source_map (3.0.1 )
39
42
json
40
- sprockets (3.0.0.beta.8 )
43
+ sprockets (2.12.3 )
44
+ hike (~> 1.2 )
45
+ multi_json (~> 1.0 )
41
46
rack (~> 1.0 )
42
- sprockets-es6 (0.6.0 )
43
- babel-transpiler
44
- sprockets (~> 3.0.0.beta )
45
- therubyracer (0.12.1 )
47
+ tilt (~> 1.1 , != 1.3.0 )
48
+ therubyracer (0.12.2 )
46
49
libv8 (~> 3.16.14.0 )
47
50
ref
48
51
tilt (1.4.1 )
Original file line number Diff line number Diff line change 1
- # config.ru
2
1
require 'bundler'
3
2
Bundler . require
4
3
5
- Opal ::Processor . source_map_enabled = true
6
-
7
- opal = Opal ::Server . new { |s |
4
+ run Opal ::Server . new { |s |
8
5
s . append_path './'
9
6
s . append_path File . dirname ( ::React ::Source . bundled_path_for ( "react-with-addons.js" ) )
10
7
s . main = 'example'
8
+ s . index_path = 'index.html.erb'
11
9
s . debug = true
12
10
}
13
-
14
- map opal . source_maps . prefix do
15
- run opal . source_maps
16
- end
17
-
18
- map '/assets' do
19
- run opal . sprockets
20
- end
21
-
22
- get '/' do
23
- <<-HTML
24
- <!doctype html>
25
- < html >
26
- < head >
27
- < title > Hello React</ title >
28
- < script src ="/assets/react-with-addons.js "> </ script >
29
- </ head >
30
- < body >
31
- < div id ="container "> </ div >
32
- < script src ="/assets/example.js "> </ script >
33
- </ body >
34
- </ html >
35
- HTML
36
- end
37
-
38
- run Sinatra ::Application
Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html >
3
+ < head >
4
+ < title > Hello React</ title >
5
+ <%= javascript_include_tag 'react-with-addons.js' %>
6
+ </ head >
7
+ < body >
8
+ < div id ="container "> </ div >
9
+ <%= javascript_include_tag 'example' %>
10
+ </ body >
11
+ </ html >
Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: ../..
3
3
specs:
4
- react.rb (0.1.0 )
4
+ react.rb (0.2.1 )
5
5
opal (~> 0.6.0 )
6
- opal-activesupport
7
- sprockets-es6
8
- therubyracer
6
+ opal-activesupport (~> 0 )
7
+ react-jsx (~> 0.8.0 )
8
+ sprockets (>= 2.2.3 , < 3.0.0 )
9
+ therubyracer (~> 0 )
9
10
10
11
GEM
11
12
remote: https://rubygems.org/
12
13
specs:
13
- babel-source (4.7.16 )
14
- babel-transpiler (0.6.0 )
15
- babel-source (>= 4.0 , < 5 )
16
- execjs (~> 2.0 )
17
- execjs (2.4.0 )
14
+ execjs (2.5.2 )
15
+ hike (1.2.3 )
18
16
json (1.8.2 )
19
17
libv8 (3.16.14.7 )
18
+ multi_json (1.11.0 )
20
19
opal (0.6.3 )
21
20
source_map
22
21
sprockets
27
26
rack (1.6.0 )
28
27
rack-protection (1.5.3 )
29
28
rack
30
- react-source (0.13.1 )
29
+ react-jsx (0.8.0 )
30
+ execjs (>= 2.0.2 )
31
+ json (>= 1.8.0 )
32
+ react-source (>= 0.4.1 )
33
+ react-source (0.13.2 )
31
34
ref (1.0.5 )
32
35
sinatra (1.4.6 )
33
36
rack (~> 1.4 )
34
37
rack-protection (~> 1.4 )
35
38
tilt (>= 1.3 , < 3 )
36
39
source_map (3.0.1 )
37
40
json
38
- sprockets (3.0.0.rc.1 )
41
+ sprockets (2.12.3 )
42
+ hike (~> 1.2 )
43
+ multi_json (~> 1.0 )
39
44
rack (~> 1.0 )
40
- sprockets-es6 (0.6.0 )
41
- babel-transpiler
42
- sprockets (~> 3.0.0.beta )
43
- therubyracer (0.12.1 )
45
+ tilt (~> 1.1 , != 1.3.0 )
46
+ therubyracer (0.12.2 )
44
47
libv8 (~> 3.16.14.0 )
45
48
ref
46
- tilt (2.0 .1 )
49
+ tilt (1.4 .1 )
47
50
48
51
PLATFORMS
49
52
ruby
Original file line number Diff line number Diff line change @@ -4,13 +4,12 @@ Bundler.require
4
4
5
5
require "react/source"
6
6
7
- Opal ::Processor . source_map_enabled = true
8
-
9
7
opal = Opal ::Server . new { |s |
10
8
s . append_path './'
11
9
s . append_path File . dirname ( ::React ::Source . bundled_path_for ( "react-with-addons.js" ) )
12
10
s . main = 'example'
13
11
s . debug = true
12
+ s . index_path = "index.html.erb"
14
13
}
15
14
16
15
map opal . source_maps . prefix do
@@ -33,23 +32,9 @@ post "/comments.json" do
33
32
JSON . generate ( comments )
34
33
end
35
34
36
- get '/' do
37
- <<-HTML
38
- <!doctype html>
39
- < html >
40
- < head >
41
- < title > Hello React</ title >
42
- < link rel ="stylesheet " href ="base.css " />
43
- < script src ="https://code.jquery.com/jquery-2.1.3.min.js "> </ script >
44
- < script src ="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js "> </ script >
45
- < script src ="/assets/react-with-addons.js "> </ script >
46
- < script src ="/assets/example.js "> </ script >
47
- </ head >
48
- < body >
49
- < div id ="content "> </ div >
50
- </ body >
51
- </ html >
52
- HTML
35
+ map '/' do
36
+ # Sourcemap won't work if only `assets/example.js` is loaded
37
+ use Opal ::Server ::Index , opal
53
38
end
54
39
55
40
run Sinatra ::Application
Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html >
3
+ < head >
4
+ < title > Hello React</ title >
5
+ < link rel ="stylesheet " href ="base.css " />
6
+ < script src ="https://code.jquery.com/jquery-2.1.3.min.js "> </ script >
7
+ < script src ="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js "> </ script >
8
+ <%= javascript_include_tag "react-with-addons.js" %>
9
+ <%= javascript_include_tag "example" %>
10
+ </ head >
11
+ < body >
12
+ < div id ="content "> </ div >
13
+ </ body >
14
+ </ html >
You can’t perform that action at this time.
0 commit comments