Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
/log/*.log
/tmp
/public/assets
webpack-bundle.js
webpack-bundle.js.map
client-bundle.js
client-bundle.js.map
.env
/node_modules
node_modules
npm-debug.log

# Ignore bundle dependencies
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
v1.1 - Sunday, March 22, 2015
------------------------------
1. Changed /webpack directory to /client
4 changes: 2 additions & 2 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
web: rails s -p 4000
webpack: cd webpack && $(npm bin)/webpack -w --config webpack.rails.config.js
hot: cd webpack && node server.js
client: cd client && $(npm bin)/webpack -w --config webpack.rails.config.js
hot: cd client && node server.js
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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

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

```
cd webpack
cd client
node server.js
```

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

```
cd webpack
cd client
$(npm bin)/webpack -w --config webpack.rails.config.js
```

`webpack-bundle.js` is generated and saved to `app/assets/javascripts`. This is included in the
`client-bundle.js` is generated and saved to `app/assets/javascripts`. This is included in the
Rails asset pipeline.

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

# Notes on Rails assets
## Javascript
The `webpack.rails.config.js` file generates webpack-bundle.js which is then included
The `webpack.rails.config.js` file generates client-bundle.js which is then included
by the Rails asset pipeline.

## Sass and images
Expand Down Expand Up @@ -232,5 +234,5 @@ shrinkwrap`.
Special thanks to [JetBrains](https://www.jetbrains.com) for their great tools
[RubyMine](https://www.jetbrains.com/ruby/) and [WebStorm](https://www.jetbrains.com/webstorm/).
The developers of this project use RubyMine at the top level, mostly for Ruby work, and we use
WebStorm opened up to the `webpack` directory to focus on JSX and Sass files.
WebStorm opened up to the `client` directory to focus on JSX and Sass files.

2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@

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

//= require webpack-bundle
//= require client-bundle
//= require turbolinks
3 changes: 0 additions & 3 deletions app/assets/javascripts/comments.js.coffee

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/javascripts/pages.js.coffee

This file was deleted.

2 changes: 1 addition & 1 deletion app/assets/stylesheets/_bootstrap-custom.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Customizations - needs to be imported first!
// The _bootstrap-variables-customization.scss file is located under
// webpack/assets/stylesheets, which has been added to the Rails asset
// client/assets/stylesheets, which has been added to the Rails asset
// pipeline search path. See config/application.rb.
@import "bootstrap-variables-customization";

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// with Rails vs. the Webpack Dev Server
$rails: true;

// Those scss files are located under webpack/assets/stylesheets,
// Those scss files are located under client/assets/stylesheets,
// which has been added to the Rails asset pipeline search path.
// See config/application.rb.
@import "bootstrap-custom";
Expand Down
3 changes: 3 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Please see parent directory README.md.

(We may move client side specific README material here in the near future).
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ var React = require('react/addons');
// the React Developer Tools: http://facebook.github.io/react/blog/2014/01/02/react-chrome-developer-tools.html
// require("expose?React!react");

var Input = require('react-bootstrap/Input');
var Button = require('react-bootstrap/Button');
var Row = require('react-bootstrap/Row');
var Col = require('react-bootstrap/Col');
var Nav = require('react-bootstrap/Nav')
var NavItem = require('react-bootstrap/NavItem')
var Input = require('react-bootstrap/lib/Input');
var Button = require('react-bootstrap/lib/Button');
var Row = require('react-bootstrap/lib/Row');
var Col = require('react-bootstrap/lib/Col');
var Nav = require('react-bootstrap/lib/Nav')
var NavItem = require('react-bootstrap/lib/NavItem')

var marked = require("marked");

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intended? On another project, I have been using these paths without specifying lib.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, part of updating react-bootstrap.

Expand Down
File renamed without changes.
File renamed without changes.
Loading