This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 1
1
if RUBY_ENGINE == 'opal'
2
- # require 'reactrb' # how to require this conditionally????
2
+ no_source = `Opal.global.ReactRouter === undefined`
3
+ if no_source
4
+ error = <<-ERROR
5
+ No react-router.js Available.
6
+
7
+ A global `ReactRouter` must be defined before requiring 'hyper-router'.
8
+
9
+ To USE THE BUILT-IN SOURCE:
10
+ add 'require \" hyper-router/react-router-source\" '
11
+ immediately before the 'require \" hyper-router\" directive.
12
+
13
+ IF USING NPM/WEBPACK:
14
+ add "react-router": "~2.4.0" to your package.json.)
15
+ ERROR
16
+ raise error
17
+ end
3
18
require 'hyper-react'
4
19
require 'promise'
5
20
require 'promise_extras'
6
- require 'react/router/react-router'
7
21
require 'react/router'
8
22
require 'react/router/dsl'
9
23
require 'react/router/dsl/route'
16
30
require 'react/router/version'
17
31
18
32
Opal . append_path File . expand_path ( '../' , __FILE__ ) . untaint
19
- Opal . append_path File . expand_path ( '../../vendor' , __FILE__ ) . untaint
20
33
end
Original file line number Diff line number Diff line change
1
+ # rubocop:disable
2
+ require 'src/react-router.js'
You can’t perform that action at this time.
0 commit comments