Skip to content

Commit 73d504b

Browse files
committed
Add section about Bootstrap integration
1 parent fb28f3f commit 73d504b

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,32 @@ bundle install
7575
rake db:setup
7676
rails s -p 4000
7777
```
78-
Point browser to [http://0.0.0.0:4000]().
78+
Point your browser to [http://0.0.0.0:4000]().
7979

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.
8181

8282
# Webpack configuration
8383
- `webpack.hot.config.js`: Used by server.js to run the demo express server.
8484
- `webpack.rails.config.js`: Used to generate the Rails bundles.
8585
- `webpack.common.config.js`: Common configuration file to minimize code duplication.
8686

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+
87104
# Notes on Rails assets
88105
## Javascript
89106
The `webpack.rails.config.js` file generates rails-bundle.js which is then included

0 commit comments

Comments
 (0)