* wip
This commit is contained in:
parent
cdaac868de
commit
88b5b545c5
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
//= require everywhere/everywhere
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
var React = require('react');
|
||||
|
||||
var DemoComponent = React.createClass({displayName: 'Demo Component',
|
||||
render: function() {
|
||||
return <div>Demo Component</div>;
|
||||
}
|
||||
});
|
||||
|
||||
// each file will export exactly one component
|
||||
module.exports = DemoComponent;
|
||||
|
|
@ -81,6 +81,9 @@
|
|||
<%= render 'dialogs/dialogs' %>
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<h1>/app/views/pages/index.html.erb</h1>
|
||||
<%= react_component 'DemoComponent', {} %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"vendor": {
|
||||
"name": "bower-rails generated vendor assets",
|
||||
"dependencies": {
|
||||
"fluxxor": "1.5.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -77,6 +77,7 @@ if defined?(Bundler)
|
|||
|
||||
# Add the assets/fonts directory to assets.paths
|
||||
config.assets.paths << "#{Rails.root}/app/assets/fonts"
|
||||
config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components')
|
||||
|
||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS (i.e., images) are already added)
|
||||
config.assets.precompile += %w( client/client.css )
|
||||
|
|
@ -86,6 +87,51 @@ if defined?(Bundler)
|
|||
config.assets.precompile += %w( minimal/minimal.js minimal/minimal.css )
|
||||
|
||||
|
||||
|
||||
########
|
||||
######## https://github.com/browserify-rails/browserify-rails
|
||||
########
|
||||
|
||||
# Paths, that should be browserified. We browserify everything, that
|
||||
# matches (===) one of the paths. So you will most likely put lambdas
|
||||
# regexes in here.
|
||||
#
|
||||
# By default only files in /app and /node_modules are browserified,
|
||||
# vendor stuff is normally not made for browserification and may stop
|
||||
# working.
|
||||
# config.browserify_rails.paths << /vendor\/assets\/javascripts\/module.js/
|
||||
|
||||
# Environments, in which to generate source maps
|
||||
#
|
||||
# The default is none
|
||||
# config.browserify_rails.source_map_environments << "development"
|
||||
|
||||
# Should the node_modules directory be evaluated for changes on page load
|
||||
#
|
||||
# The default is `false`
|
||||
# config.browserify_rails.evaluate_node_modules = true
|
||||
|
||||
# Force browserify on every found JavaScript asset
|
||||
#
|
||||
# The default is `false`
|
||||
# config.browserify_rails.force = true
|
||||
|
||||
# Command line options used when running browserify
|
||||
#
|
||||
# can be provided as an array:
|
||||
# config.browserify_rails.commandline_options = ["-t browserify-shim", "--fast"]
|
||||
|
||||
# or as a string:
|
||||
# config.browserify_rails.commandline_options = "-t browserify-shim --fast"
|
||||
|
||||
# Define NODE_ENV to be used with envify
|
||||
#
|
||||
# defaults to Rails.env
|
||||
# config.browserify_rails.node_env = "production"
|
||||
|
||||
|
||||
|
||||
|
||||
# where is rabbitmq?
|
||||
config.rabbitmq_host = "localhost"
|
||||
config.rabbitmq_port = 5672
|
||||
|
|
@ -348,5 +394,9 @@ if defined?(Bundler)
|
|||
config.web_performance_timing_enabled = true
|
||||
config.jamtrack_landing_bubbles_enabled = true
|
||||
config.jamtrack_browser_bubbles_enabled = true
|
||||
|
||||
config.react.variant = :production
|
||||
config.react.addons = true
|
||||
config.browserify_rails.commandline_options = "-t coffeeify --extension=\".js.coffee\" --transform reactify --extension=\".jsx\""
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -96,4 +96,6 @@ SampleApp::Application.configure do
|
|||
config.email_generic_from = 'nobody-dev@jamkazam.com'
|
||||
config.email_alerts_alias = ENV['ALERT_EMAIL'] || 'alerts-dev@jamkazam.com'
|
||||
config.guard_against_fraud = true
|
||||
|
||||
config.react.variant = :development
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "jam-web",
|
||||
"dependencies" : {
|
||||
"browserify": "~> 6.3",
|
||||
"browserify-incremental": "^1.4.0",
|
||||
"coffeeify": "~> 0.6",
|
||||
"reactify": "^0.17.1",
|
||||
"react": "^0.12.0",
|
||||
"react-tools": "^0.12.1"
|
||||
},
|
||||
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue