Skip to content

Commit d7e07b2

Browse files
committed
Update README; Gitignore vendor/ruby
1 parent 01d1ab1 commit d7e07b2

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ webpack-bundle.js.map
2020
.env
2121
/node_modules
2222
npm-debug.log
23+
24+
# Ignore bundle dependencies
25+
vendor/ruby

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,23 @@ the browser.
4343
# Rails integration
4444

4545
## Build JS/CSS bundles
46-
Run this command to have webpack build the JS/CSS bundles and have them saved in the Rails
47-
asset pipeline (app/assets).
48-
Although not shown in this tutorial, the Webpack ExtractTextPlugin can optionally be used
49-
to extract the CSS out of the JS bundle.
46+
If not already done, run `npm install` to install all node dependencies.
47+
48+
Then instruct webpack to build the JS/CSS bundles and have them saved in the
49+
Rails asset pipeline (app/assets). Although not shown in this tutorial, the
50+
Webpack ExtractTextPlugin can optionally be used to extract the CSS out of
51+
the JS bundle.
52+
53+
```
54+
cd webpack && webpack -w --config webpack.rails.config.js
55+
```
5056

5157
The following bundles are generated:
5258
- webpack-bundle.js which gets saved to app/assets/javascripts
5359
- bootstrap-and-customizations.css which gets saved in app/assets/stylesheets
5460

5561
Observe how the bundles are automatically re-generated whenever your JSX changes.
5662

57-
```
58-
cd webpack
59-
webpack -w --config webpack.rails.config.js
60-
```
61-
6263
Make sure to invoke your local copy of the webpack executable as opposed
6364
to any globally installed webpack.
6465
See https://github.com/webpack/extract-text-webpack-plugin/blob/master/example/webpack.config.js

0 commit comments

Comments
 (0)