Commit 3544d61

mo khan <mo@mokhan.ca>
2017-03-05 18:21:53
remove react.
1 parent 0d35677
app/assets/javascripts/components/.gitkeep
app/assets/javascripts/components/recovery_day.js.jsx
@@ -1,45 +0,0 @@
-var RecoveryDay = React.createClass({
-  propTypes: {
-    squat: React.PropTypes.number,
-    benchPress: React.PropTypes.number,
-    overheadPress: React.PropTypes.number
-  },
-
-  render: function() {
-    return (
-      <div>
-        <h1 className="title">Wednesday</h1>
-        <h2 className="subtitle">Recovery Day</h2>
-        <table className="table">
-          <tbody>
-            <tr>
-              <td><strong>Squat</strong> 2x5 @ 80% of Monday's work weight</td>
-              <td>{this.rounded(this.rounded(this.props.squat * 0.9) * 0.8)}lbs</td>
-            </tr>
-            <tr>
-              <td><strong>*Bench Press</strong> (3x5 @ 90% 5RM)</td>
-              <td>{this.props.bench_press * 0.9}lbs</td>
-            </tr>
-            <tr>
-              <td>*<strong>Overhead Press</strong> 3x5 @ 90% 5RM</td>
-              <td>{this.props.overhead_press * 0.9}lbs</td>
-            </tr>
-            <tr>
-              <td><strong>Chin-up</strong> 3 x body weight</td>
-              <td></td>
-            </tr>
-            <tr>
-              <td><strong>Back Extension</strong> or <strong>Glute Ham Raise</strong> 5x10</td>
-              <td></td>
-            </tr>
-          </tbody>
-        </table>
-        <p className="content is-small">*Bench press if you overhead pressed on Monday.</p>
-      </div>
-    );
-  },
-
-  rounded: function(n) {
-    return n - (n % 5);
-  }
-});
app/assets/javascripts/lib/autoview.js.coffee
@@ -1,3 +1,15 @@
+###
+Example usage:
+
+class MyView extends Stronglifters.Autoview
+  @viewName "my-view"
+  template: JST['views/my_view']
+
+  render: () ->
+    @$el.html(@template(message: 'hello'))
+
+<div data-autoview-name="my-view"></div>
+###
 class Stronglifters.Autoview extends Backbone.View
   @views: {}
   @constructors: {}
app/assets/javascripts/views/programs/texas_method.jst.eco
@@ -1,1 +0,0 @@
-<h1>hello</h1>
app/assets/javascripts/views/programs/texas_method_view.js.coffee
@@ -1,7 +0,0 @@
-class TexasMethodView extends Stronglifters.Autoview
-  @viewName "texas-method-view"
-  template: JST['views/programs/texas_method']
-
-  render: () ->
-    html = @template(message: 'hello')
-    @$el.html(html)
app/assets/javascripts/application.js.coffee
@@ -22,9 +22,6 @@
 #= require chartkick
 #= require fullcalendar
 #= require vue
-#= require react
-#= require react_ujs
-#= require components
 
 #= require_self
 #= require_tree .
app/assets/javascripts/components.js
@@ -1,1 +0,0 @@
-//= require_tree ./components
Gemfile
@@ -52,7 +52,6 @@ source "https://rubygems.org" do
   gem "rails-erd", group: :development
   gem "rails-i18n", "~> 4.0.0"
   gem "rails_12factor", group: :production
-  gem "react-rails"
   gem "redis", "~> 3.0"
   gem "rspec-rails", group: :test
   gem "rubyzip", require: "zip"
Gemfile.lock
@@ -48,10 +48,6 @@ GEM
       descendants_tracker (~> 0.0.4)
       ice_nine (~> 0.11.0)
       thread_safe (~> 0.3, >= 0.3.1)
-    babel-source (5.8.35)
-    babel-transpiler (0.7.0)
-      babel-source (>= 4.0, < 6)
-      execjs (~> 2.0)
     bcrypt (3.1.11)
     brakeman (3.3.2)
     builder (3.2.3)
@@ -331,13 +327,6 @@ GEM
       ffi (>= 0.5.0)
     rdoc (4.2.2)
       json (~> 1.4)
-    react-rails (1.10.0)
-      babel-transpiler (>= 0.7.0)
-      coffee-script-source (~> 1.8)
-      connection_pool
-      execjs
-      railties (>= 3.2)
-      tilt
     redis (3.3.0)
     ref (2.0.0)
     request_store (1.3.2)
@@ -519,7 +508,6 @@ DEPENDENCIES
   rails-erd!
   rails-i18n (~> 4.0.0)!
   rails_12factor!
-  react-rails!
   redis (~> 3.0)!
   rspec-rails!
   rubyzip!
@@ -545,4 +533,4 @@ DEPENDENCIES
   yelp!
 
 BUNDLED WITH
-   1.14.5
+   1.14.6