webpack-rails-react 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 293d92b4e3e1f09c3e698cdaed1931f904cacae9
|
4
|
+
data.tar.gz: 52f269080cdd3cbdfee53f160a149ffe2fe99c03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9757c5269d37ca468e8e3e2910f0a24bacf4309c051a62c95ab50ad237c657bff9e8c746363b46efdf0c3aec431b10fa85d27867588c9da6e15210dd0068e62
|
7
|
+
data.tar.gz: 48dc405efad123f37a51f2589e54ab53ec0bc08187d3783acb13f6b44ef96b16f6f92d280e01ffff24d53df60ef086b4c913fdafdd35239f2dfd7abdeeafa90d
|
data/README.md
CHANGED
@@ -74,6 +74,7 @@ If you're using `[chunkhash]` in your build asset filenames (which you should be
|
|
74
74
|
* [react-router](https://github.com/cottonwoodcoding/webpack-rails-react-router)
|
75
75
|
* [redux](https://github.com/cottonwoodcoding/webpack-rails-react-redux)
|
76
76
|
* [redux react-router](https://github.com/cottonwoodcoding/webpack-rails-react-redux-router)
|
77
|
+
|
77
78
|
## TODO
|
78
79
|
|
79
80
|
* Add eslint to client
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Route } from 'react-router';
|
3
3
|
import App from './containers/App';
|
4
|
+
import NoMatch from './components/NoMatch';
|
4
5
|
|
5
6
|
export default (
|
6
7
|
<Route>
|
7
8
|
<Route path="/" component={App} />
|
9
|
+
<Route path="*" status={404} component={NoMatch}/>
|
8
10
|
</Route>
|
9
11
|
)
|
10
12
|
|
@@ -65,10 +65,12 @@ module WebpackRailsReact
|
|
65
65
|
copy_file "boilerplate/router_redux/reducers.js", "webpack/reducers/index.js"
|
66
66
|
create_file "webpack/actions.js"
|
67
67
|
copy_file "boilerplate/router/App.js", "webpack/containers/App.js"
|
68
|
+
copy_file "boilerplate/router/NoMatch.js", "webpack/components/NoMatch.js"
|
68
69
|
elsif options[:router]
|
69
70
|
copy_file "boilerplate/router/application.js", "webpack/application.js"
|
70
71
|
copy_file "boilerplate/routes.js", "webpack/routes.js"
|
71
72
|
copy_file "boilerplate/router/App.js", "webpack/containers/App.js"
|
73
|
+
copy_file "boilerplate/router/NoMatch.js", "webpack/components/NoMatch.js"
|
72
74
|
elsif options[:redux]
|
73
75
|
copy_file "boilerplate/redux/application.js", "webpack/application.js"
|
74
76
|
copy_file "boilerplate/redux/store.js", "webpack/store.js"
|
@@ -119,6 +121,10 @@ module WebpackRailsReact
|
|
119
121
|
1. Add an element with an id of 'app' to your layout
|
120
122
|
2. To disable hot module replacement remove <script src="http://localhost:3808/webpack-dev-server.js"></script> from layout
|
121
123
|
3. Run 'foreman start' to run the webpack-dev-server and rails server
|
124
|
+
4. If you are using react-router and want to sync server routes add:
|
125
|
+
get '*unmatched_route', to: <your client controller>#<default action>
|
126
|
+
This must be the very last route in your routes.rb file
|
127
|
+
e.g. get '*unmatched_route', to: 'home#index'
|
122
128
|
|
123
129
|
See the README.md for this gem at
|
124
130
|
https://github.com/cottonwoodcoding/webpack-rails-react/blob/master/README.md
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpack-rails-react
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Jungst
|
@@ -44,6 +44,7 @@ files:
|
|
44
44
|
- example/boilerplate/redux/reducers.js
|
45
45
|
- example/boilerplate/redux/store.js
|
46
46
|
- example/boilerplate/router/App.js
|
47
|
+
- example/boilerplate/router/NoMatch.js
|
47
48
|
- example/boilerplate/router/application.js
|
48
49
|
- example/boilerplate/router_redux/application.js
|
49
50
|
- example/boilerplate/router_redux/reducers.js
|