Skip to content

Commit 956151e

Browse files
committedDec 6, 2015
Update react_on_rails to 1.1.1
Create `/bundles/Comments` folder structure Update webpack config files to reflect the change
1 parent 344875f commit 956151e

31 files changed

+21
-13
lines changed
 

‎Gemfile.lock

+7-5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ GEM
9191
coffee-script-source
9292
execjs
9393
coffee-script-source (1.10.0)
94+
concurrent-ruby (1.0.0)
9495
connection_pool (2.2.0)
9596
coveralls (0.8.9)
9697
json (~> 1.8)
@@ -139,12 +140,12 @@ GEM
139140
mime-types (>= 1.16, < 3)
140141
method_source (0.8.2)
141142
mime-types (2.99)
142-
mini_portile (0.6.2)
143+
mini_portile2 (2.0.0)
143144
minitest (5.8.3)
144145
multi_json (1.11.2)
145146
netrc (0.11.0)
146-
nokogiri (1.6.6.4)
147-
mini_portile (~> 0.6.0)
147+
nokogiri (1.6.7)
148+
mini_portile2 (~> 2.0.0.rc2)
148149
parser (2.2.3.0)
149150
ast (>= 1.1, < 3.0)
150151
pg (0.18.4)
@@ -203,7 +204,7 @@ GEM
203204
rainbow (2.0.0)
204205
rake (10.4.2)
205206
rdoc (4.2.0)
206-
react_on_rails (1.1.0)
207+
react_on_rails (1.1.1)
207208
connection_pool
208209
execjs (~> 2.5)
209210
rails (>= 3.2)
@@ -278,7 +279,8 @@ GEM
278279
spring (1.4.4)
279280
spring-commands-rspec (1.0.4)
280281
spring (>= 0.9.1)
281-
sprockets (3.4.1)
282+
sprockets (3.5.1)
283+
concurrent-ruby (~> 1.0)
282284
rack (> 1, < 3)
283285
sprockets-rails (2.3.3)
284286
actionpack (>= 3.0)

‎client/app/stores/commentsStore.js renamed to ‎client/app/bundles/Comments/stores/commentsStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import { compose, createStore, applyMiddleware, combineReducers } from 'redux';
55
import thunkMiddleware from 'redux-thunk';
6-
import loggerMiddleware from '../middlewares/loggerMiddleware';
6+
import loggerMiddleware from 'lib/middlewares/loggerMiddleware';
77
import reducers from '../reducers';
88
import { initalStates } from '../reducers';
99

‎client/webpack.client.base.config.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Common client-side webpack configuration used by webpack.hot.config and webpack.rails.config.
22

33
const webpack = require('webpack');
4+
const path = require('path');
45

56
const devBuild = process.env.NODE_ENV !== 'production';
67
const nodeEnv = devBuild ? 'development' : 'production';
@@ -21,10 +22,15 @@ module.exports = {
2122
],
2223

2324
// This will contain the app entry points defined by webpack.hot.config and webpack.rails.config
24-
app: [],
25+
app: [
26+
'./app/bundles/Comments/startup/clientGlobals',
27+
],
2528
},
2629
resolve: {
2730
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx', '.scss', '.css', 'config.js'],
31+
alias: {
32+
lib: path.join(process.cwd(), 'app', 'lib'),
33+
},
2834
},
2935
plugins: [
3036
new webpack.DefinePlugin({

‎client/webpack.client.hot.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ config.entry.app.push(
1616

1717
// Test out Css & Sass
1818
'./assets/stylesheets/test-stylesheet.css',
19-
'./assets/stylesheets/test-sass-stylesheet.scss',
20-
21-
// App entry point
22-
'./app/startup/clientGlobals'
19+
'./assets/stylesheets/test-sass-stylesheet.scss'
2320
);
2421

2522
config.output = {

‎client/webpack.client.rails.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ config.entry.vendor.unshift(
1919
'es5-shim/es5-shim',
2020
'es5-shim/es5-sham'
2121
);
22-
config.entry.app.push('./app/startup/clientGlobals');
2322

2423
// See webpack.common.config for adding modules common to both the webpack dev server and rails
2524

‎client/webpack.server.rails.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Common webpack configuration for server bundle
22

33
const webpack = require('webpack');
4+
const path = require('path');
45

56
const devBuild = process.env.NODE_ENV !== 'production';
67
const nodeEnv = devBuild ? 'development' : 'production';
@@ -9,13 +10,16 @@ module.exports = {
910

1011
// the project dir
1112
context: __dirname,
12-
entry: ['./app/startup/serverGlobals', 'react-dom/server', 'react'],
13+
entry: ['./app/bundles/Comments/startup/serverGlobals', 'react-dom/server', 'react'],
1314
output: {
1415
filename: 'server-bundle.js',
1516
path: '../app/assets/javascripts/generated',
1617
},
1718
resolve: {
1819
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx', 'config.js'],
20+
alias: {
21+
lib: path.join(process.cwd(), 'app', 'lib'),
22+
},
1923
},
2024
plugins: [
2125
new webpack.DefinePlugin({

0 commit comments

Comments
 (0)