@@ -75,15 +75,32 @@ bundle install
75
75
rake db:setup
76
76
rails s -p 4000
77
77
```
78
- Point browser to [ http://0.0.0.0:4000 ] ( ) .
78
+ Point your browser to [ http://0.0.0.0:4000 ] ( ) .
79
79
80
- It's important to run the Rails server on different port than the node server.
80
+ It's important to run the Rails server on a different port than the node server.
81
81
82
82
# Webpack configuration
83
83
- ` webpack.hot.config.js ` : Used by server.js to run the demo express server.
84
84
- ` webpack.rails.config.js ` : Used to generate the Rails bundles.
85
85
- ` webpack.common.config.js ` : Common configuration file to minimize code duplication.
86
86
87
+ # Bootstrap integration
88
+ Notice that Bootstrap Sass is installed as both a gem and an npm package.
89
+ When running the Rails app, the bootstrap-sass gem assets are loaded directly
90
+ through the asset pipeline without passing through Webpack.
91
+ See app/assets/application.css.scss.
92
+ On the other hand when running the Webpack dev server, the bootrap-sass npm
93
+ assets are loaded through Webpack (with help of the bootstrap-sass-loader).
94
+ See webpack/webpack.hot.config.js.
95
+
96
+
97
+ To avoid duplicating any Bootstrap customization between Rails and Webpack,
98
+ all Bootstrap customizations have been consolidated under Webpack in
99
+ webpack/assets/stylesheets/_ bootstrap-variables-customization.scss and the
100
+ webpack/assets/stylesheets directory added to the Rails asset pipeline
101
+ search path. See config config/application.rb. Keep that in mind as you
102
+ need to customize Bootstrap.
103
+
87
104
# Notes on Rails assets
88
105
## Javascript
89
106
The ` webpack.rails.config.js ` file generates rails-bundle.js which is then included
0 commit comments