redux_rails 0.1.7 → 0.1.8
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 +4 -4
- data/README.md +20 -14
- data/lib/generators/pack/pack_generator.rb +1 -1
- data/lib/redux_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1677e6a63f315d979cbb382c7bbb5c33e95414dc
|
4
|
+
data.tar.gz: 66ef9fa2348071e22516985cb61e7d1cfed5d059
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdc73cdfb7d8e7a3d7b4c7dbafdfddb677dc03fa8628f3e0b19ab8b514fd278d00e8e2da4b42889cb879405824cc90a0310d0e35dc0606ae8400e789cd562d76
|
7
|
+
data.tar.gz: e94b61c15316ca31413ff6f9239d2163d2b82e1529dc90303c7c9d149ee2c66993eafb0fa1f039f44d11e4d137e0c12d61fd6276cb69e8dccb56ebbd4543dce8
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
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.
|
3
3
|
|
4
4
|
## Table of contents
|
5
|
-
- <a href="#reduxrails
|
5
|
+
- <a href="#reduxrails--">ReduxRails</a>
|
6
6
|
- <a href="#highlights">Highlights</a>
|
7
7
|
- <a href="#install-generator">Install Generator</a>
|
8
8
|
- <a href="#created-foldersfile">Created folders/files</a>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
- install component and container folders in any folder location from the command line with the necessary import/export/require lines.
|
32
32
|
- react-router-dom
|
33
33
|
- redux-devtools-extension
|
34
|
-
###### <a href="#reduxrails
|
34
|
+
###### <a href="#reduxrails--">Back to top</a>
|
35
35
|
### Install Generator
|
36
36
|
- Installs the following dependencies `react-redux` `redux` `redux-devtools-extension` `react-router-dom` `react-router-redux` `history`
|
37
37
|
- Installs a new #{your_app_name}.jsx file in app/javascript/packs with additional Redux setup options commented out for modifications.
|
@@ -55,7 +55,7 @@
|
|
55
55
|
* app/javascript/src/#{your_app_name}/containers/app/actionTypes.js,
|
56
56
|
* app/javascript/src/#{your_app_name}/containers/app/constants.js,
|
57
57
|
* app/javascript/src/#{your_app_name}/containers/app/appReducer.js
|
58
|
-
###### <a href="#reduxrails
|
58
|
+
###### <a href="#reduxrails--">Back to top</a>
|
59
59
|
### Pack Generator
|
60
60
|
- Installs a new #{your_app_name}.jsx file in app/javascript/packs with additional Redux setup options commented out for modifications.
|
61
61
|
###### *if you leave #{your_app_name} blank. file, component and container names will default to 'app'*
|
@@ -78,13 +78,13 @@
|
|
78
78
|
* app/javascript/src/#{your_app_name}/containers/app/actionTypes.js,
|
79
79
|
* app/javascript/src/#{your_app_name}/containers/app/constants.js,
|
80
80
|
* app/javascript/src/#{your_app_name}/containers/app/appReducer.js
|
81
|
-
###### <a href="#reduxrails
|
81
|
+
###### <a href="#reduxrails--">Back to top</a>
|
82
82
|
### Component Generator
|
83
83
|
#### Created folder/files
|
84
84
|
* app/javascript/src/#{your_app_name}/components/app/#{your_component_name},
|
85
85
|
* app/javascript/src/#{your_app_name}/components/app/#{your_component_name}/#{your_component_name}.js,
|
86
86
|
* app/javascript/src/#{your_app_name}/components/app/#{your_component_name}/#{your_component_name}.scss
|
87
|
-
###### <a href="#reduxrails
|
87
|
+
###### <a href="#reduxrails--">Back to top</a>
|
88
88
|
### Container Generator
|
89
89
|
#### Created folder/files
|
90
90
|
* app/javascript/src/#{your_app_name}/containers/#{your_container_name},
|
@@ -94,7 +94,7 @@
|
|
94
94
|
* app/javascript/src/#{your_app_name}/containers/#{your_container_name}/constants.js,
|
95
95
|
* app/javascript/src/#{your_app_name}/containers/#{your_container_name}/#{your_container_name}Reducer.js
|
96
96
|
- each generated container reducer will be imported into #{your_app_name} root reducer at app/javascript/src/#{your_app_name}/reducer.js and included in the combineReducer
|
97
|
-
###### <a href="#reduxrails
|
97
|
+
###### <a href="#reduxrails--">Back to top</a>
|
98
98
|
## Installation
|
99
99
|
|
100
100
|
Create a new Rails project with webpack option
|
@@ -108,13 +108,15 @@ Then navigate into your new project:
|
|
108
108
|
Add this line to your application's Gemfile:
|
109
109
|
|
110
110
|
```ruby
|
111
|
-
gem 'redux_rails'
|
111
|
+
gem 'redux_rails'
|
112
112
|
```
|
113
113
|
|
114
114
|
And then execute:
|
115
115
|
|
116
116
|
$ bundle
|
117
117
|
|
118
|
+
> I also recommend running `bundle update` to make sure you have the most current version of `redux_rails`
|
119
|
+
|
118
120
|
Or install it yourself as:
|
119
121
|
|
120
122
|
$ gem install redux_rails
|
@@ -154,7 +156,7 @@ At this point, Rails has created a javascript friendly app for you. To render th
|
|
154
156
|
```
|
155
157
|
Hello React!
|
156
158
|
```
|
157
|
-
###### <a href="#reduxrails
|
159
|
+
###### <a href="#reduxrails--">Back to top</a>
|
158
160
|
## Usage
|
159
161
|
|
160
162
|
### Install generator
|
@@ -197,7 +199,7 @@ Once the Install Generator is finished:
|
|
197
199
|
#{your_app_name} component!
|
198
200
|
find me in find me in app/javascript/src/#{your_app_name}/components/#{your_app_name}/#{your_app_name}.js
|
199
201
|
```
|
200
|
-
###### <a href="#reduxrails
|
202
|
+
###### <a href="#reduxrails--">Back to top</a>
|
201
203
|
### Pack generator
|
202
204
|
The Pack generator takes a single name argument
|
203
205
|
###### *if you leave #{your_app_name} blank file, component and container names will default to 'app'*
|
@@ -235,10 +237,12 @@ Once the Pack Generator is finished:
|
|
235
237
|
#{your_app_name} component!
|
236
238
|
find me in find me in app/javascript/src/#{your_app_name}/components/#{your_app_name}/#{your_app_name}.js
|
237
239
|
```
|
238
|
-
###### <a href="#reduxrails
|
240
|
+
###### <a href="#reduxrails--">Back to top</a>
|
239
241
|
### Component generator
|
240
242
|
The Component generator takes two arguments (the new Component name and the desired install location)
|
241
243
|
###### *if you leave #{your_app_name} or #{your_component_name} blank. file, component and container names will default to 'app'*
|
244
|
+
> you can install a component folder anywhere you would like by typing out the full path during the install command. `rails g component your_awesome_component_name your_app/some_other_folder/some_folder`
|
245
|
+
|
242
246
|
To create a new component run:
|
243
247
|
|
244
248
|
$ rails generate component #{your_component_name} #{your_app_name}
|
@@ -247,10 +251,12 @@ This will generate a new folder inside of your components folder with the follow
|
|
247
251
|
- `app/javascript/src/#{your_app_name}/components/#{your_component_name}`
|
248
252
|
- `app/javascript/src/#{your_app_name}/components/#{your_component_name}/#{your_component_name}.js`
|
249
253
|
- `app/javascript/src/#{your_app_name}/components/#{your_component_name}/#{your_component_name}.scss`
|
250
|
-
###### <a href="#reduxrails
|
254
|
+
###### <a href="#reduxrails--">Back to top</a>
|
251
255
|
### Container generator
|
252
256
|
The Container generator takes two arguments (the new Container name and the desired install location)
|
253
257
|
###### *if you leave #{your_app_name} or #{your_container_name} blank. file, component and container names will default to 'app'*
|
258
|
+
> you can install a container folder anywhere you would like by typing out the full path during the install command. `rails g container your_awesome_container_name your_app/some_other_folder/some_folder`. However, using this with the container generator you will have to manually add your folders location to the rootReducer you wish to use for this new container.
|
259
|
+
|
254
260
|
To create a new container run:
|
255
261
|
|
256
262
|
$ rails generate container #{your_container_name} #{your_app_name}
|
@@ -262,13 +268,13 @@ This will generate a new folder inside of your containers folder with the follow
|
|
262
268
|
- `app/javascript/src/#{your_app_name}/containers/#{your_container_name}/actionTypes.js`
|
263
269
|
- `app/javascript/src/#{your_app_name}/containers/#{your_container_name}/constants.js`
|
264
270
|
- `app/javascript/src/#{your_app_name}/containers/#{your_container_name}/#{your_container_name}Reducer.js`
|
265
|
-
###### <a href="#reduxrails
|
271
|
+
###### <a href="#reduxrails--">Back to top</a>
|
266
272
|
## Development
|
267
273
|
|
268
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.
|
269
275
|
|
270
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).
|
271
|
-
###### <a href="#reduxrails
|
277
|
+
###### <a href="#reduxrails--">Back to top</a>
|
272
278
|
## Contributing
|
273
279
|
|
274
280
|
Bug reports and pull requests are welcome on GitHub at https://github.com/Luke-Popwell/redux_rails.
|
@@ -276,4 +282,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/Luke-P
|
|
276
282
|
## License
|
277
283
|
|
278
284
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
279
|
-
###### <a href="#reduxrails
|
285
|
+
###### <a href="#reduxrails--">Back to top</a>
|
data/lib/redux_rails/version.rb
CHANGED