react_rails_webpack 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4b0dff19a83c0ec6417746b7b8aec0a5014dc4f
4
- data.tar.gz: 856fbb2cf877e0ba948fdc600d7b58e279f19581
3
+ metadata.gz: c564775a3830635f1296ef6927ed3421bbe54662
4
+ data.tar.gz: f7398865699cd5202092ebc330a13f996a2abd5f
5
5
  SHA512:
6
- metadata.gz: f4c7b4e51d0e623dd3ce442b9ed0277d1ca208ec2c3d87a271d74173534cb9f408ff0dc6f127bb15c748a98698dbfa49f5b7b8e907772f1dc5408152ddc87ca5
7
- data.tar.gz: 7d62db4616ecd75a0bb938a8365ced4b30e175ec55e2e311fb3354ab807a1fb90d0e8dc51ad85b2f16d0fdde6ddca94c772918efb105e485545a919d64e4bb81
6
+ metadata.gz: b6d301c7768c55a2ab4715d9ffcc0a9f7e1c8489ddbd98655664647894008ea392b98a654f68b64706c3770dfe635867548dff8b974d03d54911f6424bf0bffe
7
+ data.tar.gz: 30147f1de1a0648e9728696ee120fefb55d77be1f65eea3297c8f55909a453219ae9b94d45812bba029c032ff331bd22f6811c824981c65c4d44405793d0d40f
data/README.md CHANGED
@@ -9,38 +9,59 @@ A set of Rails generators that create all the necessary boilerplate code (with e
9
9
  3. Automatically sets up working demo examples so you can jump into React immediately
10
10
  4. Development server for React components will live update your changes to any device on your local network (including phones)
11
11
 
12
- ## Quick Start
13
-
14
- ### Install
12
+ ## Install
15
13
 
16
14
  1. Make sure you have the [requirements](#requirements) installed
17
15
  2. Add `gem 'react_rails_webpack'` to your Gemfile
18
16
  3. Run `bundle install`
19
17
  4. Run `rails g react_rails_webpack:install` ([further explanation of what this does](#how-does-this-work))
20
18
 
21
- ### Commands
19
+ ## See demo components
20
+
21
+ ### On webpack dev server
22
+
23
+ 1. Run the webpack dev server with `npm run start`
24
+ 2. Go to the url specified by the `rake react_rails_webpack:print_server_info` command
25
+
26
+ ### On your rails app
27
+
28
+ 1. Generate an example page in rails with the `rails g react_rails_webpack:create_example_page` command
29
+ 2. Start your Rails server with `rails s`
30
+ 3. Go to [localhost:3000/greeting](localhost:3000/greeting)
31
+
32
+ ## Commands
22
33
 
23
- #### `rails g react_rails_webpack:install`
34
+ ### Set up the integration
24
35
 
25
- Sets up the integration
36
+ `rails g react_rails_webpack:install`
26
37
 
27
- #### `rails g react_rails_webpack:create_example_page`
38
+ Further explanation of what this does [here](#how-does-this-work).
28
39
 
29
- Sets up an example page in your Rails app at [localhost:3000/greeting](http://localhost:3000/greeting) that displays the two example components.
40
+ ### Sets up an example page in your Rails app
30
41
 
31
- #### `rails g react_rails_webpack:new_fork`
42
+ `rails g react_rails_webpack:create_example_page`
32
43
 
33
- You must run this whenever you clone a repo with a react_rails_webpack integration setup. It generates [the environment.json file](lib/react_rails_webpack/client/environment.json) based on your computer's network name. Since the network name will be different for most computers, this file is gitignored and needs to be regenerated for each new computer the project is cloned on.
44
+ Sets up an example page in your Rails app at [localhost:3000/greeting](http://localhost:3000/greeting) that displays the two example components.
34
45
 
35
- #### `rake react_rails_webpack:print_server_info`
46
+ ### Configure react_rails_webpack on a new clone of your repo
47
+
48
+ `rails g react_rails_webpack:new_fork`
49
+
50
+ **You must run this whenever you clone a repo with a react_rails_webpack integration setup**. It generates [the environment.json file](lib/react_rails_webpack/client/environment.json) based on your computer's network name. Since the network name will be different for most computers, this file is gitignored and needs to be regenerated for each new computer the project is cloned on.
51
+
52
+ ### See the url of your webpack development server
53
+
54
+ `rake react_rails_webpack:print_server_info`
36
55
 
37
56
  This command will tell you the url of your webpack development server on your local network.
38
57
 
39
- #### `rails g react_rails_webpack:trailblazer_integration`
58
+ ### Generate react component Trailblazer cell
59
+
60
+ `rails g react_rails_webpack:trailblazer_integration`
40
61
 
41
62
  If you use the Trailblazer gem, use this command to add a [trailblazer](https://github.com/apotonick/trailblazer) cell for react components to your `lib` folder.
42
63
 
43
- ### Suggested Development Workflow
64
+ ## Suggested Development Workflow
44
65
 
45
66
  1. Write the code for your React components in the [client/src/components](lib/react_rails_webpack/client/src/components) directory
46
67
  2. Test your new components with live reloading by running the webpack dev server with the command `npm run start` (note: the base html page for the webpack dev server is based on the html provided to `context.defaultTemplate` in [the webpack.config.js file](lib/react_rails_webpack/client/webpack.config.js))
@@ -1,3 +1,3 @@
1
1
  module ReactRailsWebpack
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
@@ -5,8 +5,8 @@ namespace :react_rails_webpack do
5
5
  puts
6
6
  puts "-" * `tput cols`.to_i # print line of dashes
7
7
  puts
8
- puts "To run a live-reloading webpack server for you React \
9
- components, run #{'npm run start'.white.bold}, then go to #{(`scutil --get LocalHostName`.strip + '.local:3000').blue.bold}"
8
+ puts "To run a live-reloading webpack server for your React \
9
+ components, run #{'npm run start'.white.bold}, then go to #{(`scutil --get LocalHostName`.strip + '.local:3000').blue.bold}"
10
10
  puts
11
11
  puts "-" * `tput cols`.to_i # print line of dashes
12
12
  puts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_rails_webpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neurodynamic