diff --git a/web/Gemfile b/web/Gemfile index 0dc9d2806..a141bc9ef 100644 --- a/web/Gemfile +++ b/web/Gemfile @@ -89,6 +89,13 @@ gem 'guard', '2.7.3' gem 'influxdb', '0.1.8' gem 'influxdb-rails', '0.1.10' gem 'sitemap_generator' +gem 'bower-rails', "~> 0.9.2" +gem 'react-rails', '~> 1.0' +gem "browserify-rails", "~> 0.7" + +source 'https://rails-assets.org' do + gem 'rails-assets-fluxxor' +end group :development, :test do gem 'rspec-rails', '2.14.2' @@ -135,7 +142,7 @@ group :test, :cucumber do # gem 'growl', '1.0.3' gem 'poltergeist' gem 'resque_spec' - #gem 'thin' + #gem 'thin' end diff --git a/web/app/assets/javascripts/application.js b/web/app/assets/javascripts/application.js index d9ca26642..958491cb7 100644 --- a/web/app/assets/javascripts/application.js +++ b/web/app/assets/javascripts/application.js @@ -38,6 +38,8 @@ //= require jquery.exists //= require jquery.payment //= require jquery.visible +//= require fluxxor +//= require react-components //= require howler.core.js //= require jstz //= require class @@ -59,4 +61,4 @@ //= require_directory ./wizard //= require_directory ./wizard/gear //= require_directory ./wizard/loopback -//= require everywhere/everywhere \ No newline at end of file +//= require everywhere/everywhere diff --git a/web/app/assets/javascripts/react-components.js b/web/app/assets/javascripts/react-components.js new file mode 100644 index 000000000..e534d5c8c --- /dev/null +++ b/web/app/assets/javascripts/react-components.js @@ -0,0 +1,9 @@ +//= require_self +//= require react_ujs + +React = require('react'); + +// note that this is a global assignment, it will be discussed further below +DemoComponent = require('./components/DemoComponent'); + +// //= require_tree ./react-components diff --git a/web/app/assets/javascripts/react-components/.gitkeep b/web/app/assets/javascripts/react-components/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/web/app/assets/javascripts/react-components/DemoComponent.jsx b/web/app/assets/javascripts/react-components/DemoComponent.jsx new file mode 100644 index 000000000..59d296fbe --- /dev/null +++ b/web/app/assets/javascripts/react-components/DemoComponent.jsx @@ -0,0 +1,10 @@ +var React = require('react'); + +var DemoComponent = React.createClass({displayName: 'Demo Component', + render: function() { + return