2
2
3
3
By Justin Gordon and the Rails On Maui Team, http://www.railsonmaui.com
4
4
5
+ - If you came to here from the blog article, this example project has evolved. See CHANGELOG.md for
6
+ what's changed.
5
7
- Please email us at
[ [email protected] ] ( mailto:[email protected] ) if you have a ReactJs +
6
8
Rails project.
7
9
- Please file issues for problems and feature requests.
@@ -64,7 +66,7 @@ See package.json and Gemfile for versions
64
66
Setup node and run the node server with file ` server.js ` .
65
67
66
68
```
67
- cd webpack
69
+ cd client
68
70
node server.js
69
71
```
70
72
@@ -85,11 +87,11 @@ Webpack ExtractTextPlugin can optionally be used to extract the CSS out of
85
87
the JS bundle. We've chosen to let Rails handle CSS, SCSS, images, fonts.
86
88
87
89
```
88
- cd webpack
90
+ cd client
89
91
$(npm bin)/webpack -w --config webpack.rails.config.js
90
92
```
91
93
92
- ` webpack -bundle.js` is generated and saved to ` app/assets/javascripts ` . This is included in the
94
+ ` client -bundle.js` is generated and saved to ` app/assets/javascripts ` . This is included in the
93
95
Rails asset pipeline.
94
96
95
97
Observe how the bundles are automatically re-generated whenever your JSX changes.
@@ -155,7 +157,7 @@ customize the Bootstrap Sass variables.
155
157
156
158
# Notes on Rails assets
157
159
## Javascript
158
- The ` webpack.rails.config.js ` file generates webpack -bundle.js which is then included
160
+ The ` webpack.rails.config.js ` file generates client -bundle.js which is then included
159
161
by the Rails asset pipeline.
160
162
161
163
## Sass and images
@@ -232,5 +234,5 @@ shrinkwrap`.
232
234
Special thanks to [ JetBrains] ( https://www.jetbrains.com ) for their great tools
233
235
[ RubyMine] ( https://www.jetbrains.com/ruby/ ) and [ WebStorm] ( https://www.jetbrains.com/webstorm/ ) .
234
236
The developers of this project use RubyMine at the top level, mostly for Ruby work, and we use
235
- WebStorm opened up to the ` webpack ` directory to focus on JSX and Sass files.
237
+ WebStorm opened up to the ` client ` directory to focus on JSX and Sass files.
236
238
0 commit comments