diff --git a/Gemfile b/Gemfile index 2db8498..69f2e23 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,6 @@ source 'https://rubygems.org' gem 'opal-react', :path => '../react.rb' -gem 'opal-browser' -gem 'sinatra' gem 'opal-jquery' gem 'react-source' diff --git a/Gemfile.lock b/Gemfile.lock index b1499b7..37a4360 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,20 +44,10 @@ GEM tilt (>= 1.4) opal-activesupport (0.1.0) opal (>= 0.5.0, < 1.0.0) - opal-browser (0.1.0.beta1) - opal (>= 0.5.5) - paggio opal-jquery (0.4.0) opal (>= 0.7.0, < 0.9.0) - paggio (0.2.4) rack (1.6.4) - rack-protection (1.5.3) - rack react-source (0.13.3) - sinatra (1.4.6) - rack (~> 1.4) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) sourcemap (0.1.1) sprockets (3.2.0) rack (~> 1.0) @@ -67,7 +57,6 @@ PLATFORMS ruby DEPENDENCIES - opal-browser opal-jquery opal-react! parslet! @@ -76,7 +65,6 @@ DEPENDENCIES salama-arm! salama-object-file! salama-reader! - sinatra BUNDLED WITH 1.10.5 diff --git a/app/debugger.rb b/app/debugger.rb index 200b52b..dab4d30 100644 --- a/app/debugger.rb +++ b/app/debugger.rb @@ -1,5 +1,4 @@ require 'opal' -require 'browser' require 'opal-jquery' require "json" require 'opal-react' diff --git a/config.ru b/config.ru index a2f17df..c6ad4af 100644 --- a/config.ru +++ b/config.ru @@ -5,42 +5,11 @@ Bundler.require require "react/source" -opal = Opal::Server.new {|s| +run Opal::Server.new {|s| s.append_path 'app' s.append_path File.dirname(::React::Source.bundled_path_for("react-with-addons.js")) - s.main = 'debuger' + s.main = 'debugger' s.debug = true s.source_map = true + s.index_path = "index.html.erb" } - -map '/assets' do - run opal.sprockets -end - - -post "/parse.json" do - -# File.write('./parse.json', JSON.pretty_generate(comments, :indent => ' ')) -# JSON.generate(comments) -end - -get '/' do - <<-HTML - - - - Salama Debugger - - - - - - - -
- - - HTML -end - -run Sinatra::Application diff --git a/index.html.erb b/index.html.erb new file mode 100644 index 0000000..e1e911e --- /dev/null +++ b/index.html.erb @@ -0,0 +1,12 @@ + + + Salama Debugger + + + + <%= javascript_include_tag 'debugger' %> + + +
+ +