react_rails_webpack 1.2.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +2 -0
- data/lib/react_rails_webpack/install_generator.rb +1 -1
- data/lib/react_rails_webpack/version.rb +1 -1
- data/lib/react_rails_webpack.rb +6 -2
- data/lib/tasks/print_server_info.rake +14 -0
- data/lib/tasks/print_whats_next_instructions.rake +26 -0
- metadata +3 -3
- data/lib/react_rails_webpack/info_generator.rb +0 -21
- data/lib/react_rails_webpack/whats_next_generator.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3095d6f00526dbb127e6eab7bc924a44ca773c9
|
4
|
+
data.tar.gz: c40ac962b27d70eb9fef256655dbe3a9a66f2721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab150f233042622e848e687b8cdd2e766a89a8341804cbdcdda89087daab1e19f4e2dddd360beec3c2ba251b34605878b1538c90cbc8da300f6bf8bbc7612eb4
|
7
|
+
data.tar.gz: fd43b63a04eb8f2247e2028edd41e56f86cdba39f9458e6c87ddc097f6e3e1bc28032893b16e93d3c1d8f56f5efda1b442a1900154e43ee89af439167fd742e4
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ Sets up an example page in your Rails app at [localhost:3000/greeting](http://l
|
|
32
32
|
|
33
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.
|
34
34
|
|
35
|
-
#### `
|
35
|
+
#### `rake react_rails_webpack:print_server_info`
|
36
36
|
|
37
37
|
This command will tell you the url of your webpack development server on your local network.
|
38
38
|
|
data/Rakefile
CHANGED
@@ -96,7 +96,7 @@ module ReactRailsWebpack
|
|
96
96
|
puts "-" * `tput cols`.to_i # print line of dashes
|
97
97
|
puts
|
98
98
|
|
99
|
-
exec('npm run install && npm run build;
|
99
|
+
exec('npm run install && npm run build; rake react_rails_webpack:print_whats_next_instructions')
|
100
100
|
end
|
101
101
|
|
102
102
|
|
data/lib/react_rails_webpack.rb
CHANGED
@@ -5,10 +5,14 @@ module ReactRailsWebpack
|
|
5
5
|
generators do
|
6
6
|
require_relative 'react_rails_webpack/install_generator'
|
7
7
|
require_relative 'react_rails_webpack/new_fork_generator'
|
8
|
-
require_relative 'react_rails_webpack/whats_next_generator'
|
9
|
-
require_relative 'react_rails_webpack/info_generator'
|
10
8
|
require_relative 'react_rails_webpack/create_example_page_generator'
|
11
9
|
require_relative 'react_rails_webpack/trailblazer_integration_generator'
|
12
10
|
end
|
11
|
+
|
12
|
+
rake_tasks do
|
13
|
+
spec = Gem::Specification.find_by_name 'react_rails_webpack'
|
14
|
+
load "#{spec.gem_dir}/lib/tasks/print_server_info.rake"
|
15
|
+
load "#{spec.gem_dir}/lib/tasks/print_whats_next_instructions.rake"
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'colorize'
|
2
|
+
|
3
|
+
namespace :react_rails_webpack do
|
4
|
+
task :print_server_info do
|
5
|
+
puts
|
6
|
+
puts "-" * `tput cols`.to_i # print line of dashes
|
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}"
|
10
|
+
puts
|
11
|
+
puts "-" * `tput cols`.to_i # print line of dashes
|
12
|
+
puts
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'colorize'
|
2
|
+
|
3
|
+
namespace :react_rails_webpack do
|
4
|
+
task :print_whats_next_instructions do
|
5
|
+
puts
|
6
|
+
puts "-" * `tput cols`.to_i # print line of dashes
|
7
|
+
puts
|
8
|
+
puts "DONE!"
|
9
|
+
puts
|
10
|
+
puts "Okay, #{'if you saw any errors'.red.bold} when the \
|
11
|
+
#{'npm run install'.white.bold} and #{'npm run build'.white.bold} commands \
|
12
|
+
were run just now, try running them again now manually."
|
13
|
+
puts
|
14
|
+
puts "#{"If you didn't get any errors".red.bold} you should be good to go, and \
|
15
|
+
you can start your live-reloading webpack development server for React \
|
16
|
+
by running the #{'npm run start'.white.bold} command and visiting \
|
17
|
+
#{(`scutil --get LocalHostName`.strip+'.local:3000').blue.bold} in your browser \
|
18
|
+
or on any other device on your local network (for example: your phone)."
|
19
|
+
puts
|
20
|
+
puts "#{'To generate an example page of React components inside your Rails app'.red.bold}, \
|
21
|
+
run the #{'rails g react_rails_webpack:create_example_page'.white.bold} command."
|
22
|
+
puts
|
23
|
+
puts "-" * `tput cols`.to_i # print line of dashes
|
24
|
+
puts
|
25
|
+
end
|
26
|
+
end
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neurodynamic
|
@@ -101,14 +101,14 @@ files:
|
|
101
101
|
- lib/react_rails_webpack/client/test/test_helper.js
|
102
102
|
- lib/react_rails_webpack/client/webpack.config.js
|
103
103
|
- lib/react_rails_webpack/create_example_page_generator.rb
|
104
|
-
- lib/react_rails_webpack/info_generator.rb
|
105
104
|
- lib/react_rails_webpack/install_generator.rb
|
106
105
|
- lib/react_rails_webpack/lib/react_cell.rb
|
107
106
|
- lib/react_rails_webpack/new_fork_generator.rb
|
108
107
|
- lib/react_rails_webpack/package.json
|
109
108
|
- lib/react_rails_webpack/trailblazer_integration_generator.rb
|
110
109
|
- lib/react_rails_webpack/version.rb
|
111
|
-
- lib/
|
110
|
+
- lib/tasks/print_server_info.rake
|
111
|
+
- lib/tasks/print_whats_next_instructions.rake
|
112
112
|
- react_rails_webpack.gemspec
|
113
113
|
homepage: https://github.com/neurodynamic/react_rails_webpack
|
114
114
|
licenses:
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'rails/generators/base'
|
2
|
-
require 'colorize'
|
3
|
-
|
4
|
-
module ReactRailsWebpack
|
5
|
-
class InfoGenerator < Rails::Generators::Base
|
6
|
-
desc "This generator provides basic info about the react_rails_webpack integration."
|
7
|
-
|
8
|
-
source_root(File.join(File.expand_path(File.dirname(__FILE__))))
|
9
|
-
|
10
|
-
def print_info
|
11
|
-
puts
|
12
|
-
puts "-" * `tput cols`.to_i # print line of dashes
|
13
|
-
puts
|
14
|
-
puts "To run a live-reloading webpack server for you React \
|
15
|
-
components, run #{'npm run start'.white.bold}, then go to #{(`scutil --get LocalHostName`.strip + '.local:3000').blue.bold}"
|
16
|
-
puts
|
17
|
-
puts "-" * `tput cols`.to_i # print line of dashes
|
18
|
-
puts
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'rails/generators/base'
|
2
|
-
require 'colorize'
|
3
|
-
|
4
|
-
module ReactRailsWebpack
|
5
|
-
class WhatsNextGenerator < Rails::Generators::Base
|
6
|
-
desc "This generator instructs the user on what to do \
|
7
|
-
once the react_rails_webpack:install generator is done running."
|
8
|
-
|
9
|
-
source_root(File.join(File.expand_path(File.dirname(__FILE__))))
|
10
|
-
|
11
|
-
def say_whats_next
|
12
|
-
puts
|
13
|
-
puts "-" * `tput cols`.to_i # print line of dashes
|
14
|
-
puts
|
15
|
-
puts "DONE!"
|
16
|
-
puts
|
17
|
-
puts "Okay, #{'if you saw any errors'.red.bold} when the \
|
18
|
-
#{'npm run install'.white.bold} and #{'npm run build'.white.bold} commands \
|
19
|
-
were run just now, try running them again now manually."
|
20
|
-
puts
|
21
|
-
puts "#{"If you didn't get any errors".red.bold} you should be good to go, and \
|
22
|
-
you can start your live-reloading webpack development server for React \
|
23
|
-
by running the #{'npm run start'.white.bold} command and visiting \
|
24
|
-
#{(`scutil --get LocalHostName`.strip+'.local:3000').blue.bold} in your browser \
|
25
|
-
or on any other device on your local network (for example: your phone)."
|
26
|
-
puts
|
27
|
-
puts "#{'To generate an example page of React components inside your Rails app'.red.bold}, \
|
28
|
-
run the #{'rails g react_rails_webpack:create_example_page'.white.bold} command."
|
29
|
-
puts
|
30
|
-
puts "-" * `tput cols`.to_i # print line of dashes
|
31
|
-
puts
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|