Skip to content

Commit fcd9bd4

Browse files
committed
Merge pull request #19 from justin808/move-package-json-inside-webpack-directory
Move package json inside webpack directory, updated deps, using babel-loader, changed name of dir from /webpack to /client.
2 parents 39486f2 + e284730 commit fcd9bd4

34 files changed

+1312
-1033
lines changed

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
/log/*.log
1616
/tmp
1717
/public/assets
18-
webpack-bundle.js
19-
webpack-bundle.js.map
18+
client-bundle.js
19+
client-bundle.js.map
2020
.env
21-
/node_modules
21+
node_modules
2222
npm-debug.log
2323

2424
# Ignore bundle dependencies

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
v1.1 - Sunday, March 22, 2015
2+
------------------------------
3+
1. Changed /webpack directory to /client

Procfile.dev

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
web: rails s -p 4000
2-
webpack: cd webpack && $(npm bin)/webpack -w --config webpack.rails.config.js
3-
hot: cd webpack && node server.js
2+
client: cd client && $(npm bin)/webpack -w --config webpack.rails.config.js
3+
hot: cd client && node server.js

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
By Justin Gordon and the Rails On Maui Team, http://www.railsonmaui.com
44

5+
- If you came to here from the blog article, this example project has evolved. See CHANGELOG.md for
6+
what's changed.
57
- Please email us at [[email protected]](mailto:[email protected]) if you have a ReactJs +
68
Rails project.
79
- Please file issues for problems and feature requests.
@@ -64,7 +66,7 @@ See package.json and Gemfile for versions
6466
Setup node and run the node server with file `server.js`.
6567

6668
```
67-
cd webpack
69+
cd client
6870
node server.js
6971
```
7072

@@ -85,11 +87,11 @@ Webpack ExtractTextPlugin can optionally be used to extract the CSS out of
8587
the JS bundle. We've chosen to let Rails handle CSS, SCSS, images, fonts.
8688

8789
```
88-
cd webpack
90+
cd client
8991
$(npm bin)/webpack -w --config webpack.rails.config.js
9092
```
9193

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
9395
Rails asset pipeline.
9496

9597
Observe how the bundles are automatically re-generated whenever your JSX changes.
@@ -155,7 +157,7 @@ customize the Bootstrap Sass variables.
155157

156158
# Notes on Rails assets
157159
## 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
159161
by the Rails asset pipeline.
160162

161163
## Sass and images
@@ -232,5 +234,5 @@ shrinkwrap`.
232234
Special thanks to [JetBrains](https://www.jetbrains.com) for their great tools
233235
[RubyMine](https://www.jetbrains.com/ruby/) and [WebStorm](https://www.jetbrains.com/webstorm/).
234236
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.
236238

app/assets/javascripts/application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717

1818
// Important to import jquery_ujs before rails-bundle as that patches jquery xhr to use the authenticity token!
1919

20-
//= require webpack-bundle
20+
//= require client-bundle
2121
//= require turbolinks

app/assets/javascripts/comments.js.coffee

-3
This file was deleted.

app/assets/javascripts/pages.js.coffee

-3
This file was deleted.

app/assets/stylesheets/_bootstrap-custom.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Customizations - needs to be imported first!
22
// The _bootstrap-variables-customization.scss file is located under
3-
// webpack/assets/stylesheets, which has been added to the Rails asset
3+
// client/assets/stylesheets, which has been added to the Rails asset
44
// pipeline search path. See config/application.rb.
55
@import "bootstrap-variables-customization";
66

app/assets/stylesheets/application.css.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// with Rails vs. the Webpack Dev Server
33
$rails: true;
44

5-
// Those scss files are located under webpack/assets/stylesheets,
5+
// Those scss files are located under client/assets/stylesheets,
66
// which has been added to the Rails asset pipeline search path.
77
// See config/application.rb.
88
@import "bootstrap-custom";

client/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Please see parent directory README.md.
2+
3+
(We may move client side specific README material here in the near future).
File renamed without changes.
File renamed without changes.

webpack/assets/javascripts/CommentBox.jsx renamed to client/assets/javascripts/CommentBox.jsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ var React = require('react/addons');
55
// the React Developer Tools: http://facebook.github.io/react/blog/2014/01/02/react-chrome-developer-tools.html
66
// require("expose?React!react");
77

8-
var Input = require('react-bootstrap/Input');
9-
var Button = require('react-bootstrap/Button');
10-
var Row = require('react-bootstrap/Row');
11-
var Col = require('react-bootstrap/Col');
12-
var Nav = require('react-bootstrap/Nav')
13-
var NavItem = require('react-bootstrap/NavItem')
8+
var Input = require('react-bootstrap/lib/Input');
9+
var Button = require('react-bootstrap/lib/Button');
10+
var Row = require('react-bootstrap/lib/Row');
11+
var Col = require('react-bootstrap/lib/Col');
12+
var Nav = require('react-bootstrap/lib/Nav')
13+
var NavItem = require('react-bootstrap/lib/NavItem')
1414

1515
var marked = require("marked");
1616

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)