redux_rails 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -12
- data/lib/redux_rails/version.rb +1 -1
- data/redux_rails.gemspec +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6424b26f3e6affe10cc2eebcd160e3e72e0c1b36
|
4
|
+
data.tar.gz: 9110c5af39bf4ecdf1194d824fe7558daa511ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9368f9f5df86c600f4f71085e643479e13c304bdad3b95d9351f2c33859da9c4e3ce102c084eba98365af468bf99dfd98d726454bc7487114fb0467968693420
|
7
|
+
data.tar.gz: 18743fa04085204a115b16e99f688531dff36d59f2abd949f749ad029ea61975edf9ddd9df1f061a4d8064e8fefa18d24d39281842808385f03b7d1d10650a75
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ReduxRails [![Gem Version](https://badge.fury.io/rb/redux_rails.svg)](https://badge.fury.io/rb/redux_rails) [![Build Status](https://travis-ci.org/Luke-Popwell/redux_rails.svg?branch=master)](https://travis-ci.org/Luke-Popwell/redux_rails)
|
2
|
-
> Easily setup React and Redux in Rails -v 5.1. Create re-usable project files and folders for use throughout your project or outside of the current one. Start from scratch or add to an existing project. Redux is setup during the install generator, but not required and still functions correctly. With easy component and container generators you can add to any project and use on any other projects with or without Rails.
|
2
|
+
> Easily setup [React](https://facebook.github.io/react/) and [Redux](http://redux.js.org/) in [Rails -v 5.1](http://edgeguides.rubyonrails.org/5_1_release_notes.html). Create re-usable project files and folders for use throughout your project or outside of the current one. Start from scratch or add to an existing project. Redux is setup during the install generator, but not required and still functions correctly. With easy presentational component and container generators you can add to any project and use on any other projects with or without Rails.
|
3
3
|
|
4
4
|
## Table of contents
|
5
5
|
- <a href="#reduxrails--">ReduxRails</a>
|
@@ -22,15 +22,16 @@
|
|
22
22
|
- <a href="#pack-generator-1">Pack Generator</a>
|
23
23
|
- <a href="#component-generator-1">Component Generator</a>
|
24
24
|
- <a href="#container-generator-1">Container Generator</a>
|
25
|
-
- <a href="#
|
25
|
+
- <a href="#contributing">Contributing</a>
|
26
|
+
- <a href="#helpful-links">Helpful Links</a>
|
26
27
|
- <a href="#license">License</a>
|
27
28
|
### Highlights
|
28
29
|
- install, pack, component and container generator
|
29
30
|
- creates a pack tag for `rails g redux_rails:install #{your_app_name}` command and installs the necessary lines to manifest.json. Allowing you to have several seperate React apps inside of a single rails project.
|
30
31
|
- pack generator creates a new React app you can use anywhere in your project. It includes everything from the `redux_rails:install` command without re-installing the javascript dependencies.
|
31
|
-
- install component and container folders in any folder location from the command line with the necessary import/export/require lines.
|
32
|
+
- install component and container folders in any folder location in your pipeline from the command line with the necessary import/export/require lines.
|
32
33
|
- react-router-dom
|
33
|
-
- redux-devtools-extension
|
34
|
+
- redux-devtools-extension - "https://github.com/zalmoxisus/redux-devtools-extension"
|
34
35
|
###### <a href="#reduxrails--">Back to top</a>
|
35
36
|
### Install Generator
|
36
37
|
- Installs the following dependencies `react-redux` `redux` `redux-devtools-extension` `react-router-dom` `react-router-redux` `history`
|
@@ -129,7 +130,7 @@ config.x.webpacker[:dev_server_host] = "http://127.0.0.1:8080"
|
|
129
130
|
|
130
131
|
To create the `packs/manifest.json` run:
|
131
132
|
|
132
|
-
$ bin/webpack-dev-server --host 127.0.0.1
|
133
|
+
$ ./bin/webpack-dev-server --host 127.0.0.1
|
133
134
|
|
134
135
|
At this point, Rails has created a javascript friendly app for you. To render the sample react component rails creates for you follow these steps. Or to start using the redux_rails gem skip down to Usage.
|
135
136
|
|
@@ -152,6 +153,15 @@ At this point, Rails has created a javascript friendly app for you. To render th
|
|
152
153
|
|
153
154
|
$ ./bin/webpack-dev-server --host 127.0.0.1
|
154
155
|
|
156
|
+
I use and recommend installing Forego to open a Rails server and launch webpack with a single command line entry. Link for installation in the [Helpful Links](https://github.com/Luke-Popwell/redux_rails#helpful-links) section below. Add a Procfile in your projects root folder with these two lines in the Procfile:
|
157
|
+
```
|
158
|
+
rails: bin/rails s
|
159
|
+
webpack: ./bin/webpack-dev-server --host 127.0.0.1
|
160
|
+
```
|
161
|
+
and the command to start Forego
|
162
|
+
|
163
|
+
$ forego start
|
164
|
+
|
155
165
|
5. Navigate to http://localhost:3000/pages/index and you should see
|
156
166
|
```
|
157
167
|
Hello React!
|
@@ -269,15 +279,21 @@ This will generate a new folder inside of your containers folder with the follow
|
|
269
279
|
- `app/javascript/src/#{your_app_name}/containers/#{your_container_name}/constants.js`
|
270
280
|
- `app/javascript/src/#{your_app_name}/containers/#{your_container_name}/#{your_container_name}Reducer.js`
|
271
281
|
###### <a href="#reduxrails--">Back to top</a>
|
272
|
-
## Development
|
273
|
-
|
274
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
275
|
-
|
276
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
277
|
-
###### <a href="#reduxrails--">Back to top</a>
|
278
282
|
## Contributing
|
283
|
+
Any feature requests, comments or suggestions are very welcomed and encouraged. I would like to continue to develop this gem and would appreciate any feedback from the Rails or React community about where they would like to see this go in the future.
|
284
|
+
Bug reports and pull requests are always welcome on GitHub at https://github.com/Luke-Popwell/redux_rails.
|
285
|
+
###### <a href="#reduxrails--">Back to top</a>
|
279
286
|
|
280
|
-
|
287
|
+
## Helpful Links
|
288
|
+
- [Rails 5.1](http://edgeguides.rubyonrails.org/5_1_release_notes.html)
|
289
|
+
- [react](https://facebook.github.io/react/)
|
290
|
+
- [redux](http://redux.js.org/)
|
291
|
+
- [react-router-dom](https://github.com/ReactTraining/react-router)
|
292
|
+
- [webpack v2](https://webpack.js.org/)
|
293
|
+
- [redux-devtools-extension](https://github.com/zalmoxisus/redux-devtools-extension)
|
294
|
+
- [forego](https://github.com/ddollar/forego) (foreman built in go)
|
295
|
+
- article by [Jack Hsu](https://jaysoo.ca/2016/02/28/organizing-redux-application/) about redux file structuring
|
296
|
+
###### <a href="#reduxrails--">Back to top</a>
|
281
297
|
|
282
298
|
## License
|
283
299
|
|
data/lib/redux_rails/version.rb
CHANGED
data/redux_rails.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Luke Popwell"]
|
10
10
|
spec.email = ["lukepopwell@mac.com"]
|
11
11
|
spec.summary = %q{Setup React and Redux for Rails 5.1}
|
12
|
-
spec.description = %q{Complete setup for React and Redux into Rails 5.1 pipeline or later. Includes initial
|
12
|
+
spec.description = %q{Complete setup for React and Redux into Rails 5.1 pipeline or later. Includes initial Install generator, Pack generator for creating additional React apps in your Rails pipeline. Component and Container generators for adding new presentational components and container components anywhere in your project. Full description of install located at "https://github.com/Luke-Popwell/redux_rails" }
|
13
13
|
spec.homepage = "https://github.com/Luke-Popwell/redux_rails"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redux_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Popwell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,8 +53,10 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
description: 'Complete setup for React and Redux into Rails 5.1 pipeline or later.
|
56
|
-
Includes initial
|
57
|
-
|
56
|
+
Includes initial Install generator, Pack generator for creating additional React
|
57
|
+
apps in your Rails pipeline. Component and Container generators for adding new presentational
|
58
|
+
components and container components anywhere in your project. Full description of
|
59
|
+
install located at "https://github.com/Luke-Popwell/redux_rails" '
|
58
60
|
email:
|
59
61
|
- lukepopwell@mac.com
|
60
62
|
executables: []
|