repack 2.0.2 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/repack/install_generator.rb +11 -5
- data/lib/repack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc1385ce906fb131b6b5c8985085f67577b09231
|
4
|
+
data.tar.gz: a0ae25a40acf85c80a4f40b7ceb438b55bb54ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec927d78ecae3eecd7e04a4fcf75d7e4c393f8586042775797a83dfdf0005c7a4d71ff31c2a64c321d282963f8fad299a6aed3f667caf64847910773ac71f16e
|
7
|
+
data.tar.gz: 253818712a22728f60e0a8342f6179f30abb0b98c7c9a6854e3f88cc03da18761b4c20e4e8715b55ce9c8589c5def9ee3fca9f73b99289a3cff13a7a2769e740
|
@@ -2,7 +2,7 @@ module Repack
|
|
2
2
|
# :nodoc:
|
3
3
|
class InstallGenerator < ::Rails::Generators::Base
|
4
4
|
source_root File.expand_path("../../../../example", __FILE__)
|
5
|
-
desc "Install everything you need for a basic
|
5
|
+
desc "Install everything you need for a basic repack integration"
|
6
6
|
class_option :router, type: :boolean, default: false, description: 'Add React Router'
|
7
7
|
class_option :redux, type: :boolean, default: false, description: 'Add Redux'
|
8
8
|
def copy_package_json
|
@@ -89,23 +89,29 @@ module Repack
|
|
89
89
|
EOF
|
90
90
|
end
|
91
91
|
end
|
92
|
-
|
93
|
-
|
92
|
+
|
93
|
+
def install_yarn
|
94
|
+
run "npm install -g yarn"
|
94
95
|
end
|
96
|
+
|
97
|
+
def run_yarn_install
|
98
|
+
run "yarn install" if yes?("Would you like us to run 'yarn install' for you?")
|
99
|
+
end
|
100
|
+
|
95
101
|
def whats_next
|
96
102
|
puts <<-EOF.strip_heredoc
|
97
103
|
We've set up the basics of repack for you, but you'll still
|
98
104
|
need to:
|
99
105
|
1. Add an element with an id of 'app' to your layout
|
100
106
|
2. To disable hot module replacement remove <script src="http://localhost:3808/webpack-dev-server.js"></script> from layout
|
101
|
-
3. Run '
|
107
|
+
3. Run 'yarn run dev_server' to run the webpack-dev-server
|
102
108
|
4. Run 'bundle exec rails s' to run the rails server (both servers must be running)
|
103
109
|
5. If you are using react-router and want to sync server routes add:
|
104
110
|
get '*unmatched_route', to: <your client controller>#<default action>
|
105
111
|
This must be the very last route in your routes.rb file
|
106
112
|
e.g. get '*unmatched_route', to: 'home#index'
|
107
113
|
FOR HEROKU DEPLOYS:
|
108
|
-
1.
|
114
|
+
1. yarn run heroku-setup
|
109
115
|
2. Push to heroku the post-build hook will take care of the rest
|
110
116
|
See the README.md for this gem at
|
111
117
|
https://github.com/cottonwoodcoding/repack/blob/master/README.md
|
data/lib/repack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Jungst
|
@@ -67,7 +67,7 @@ files:
|
|
67
67
|
- lib/repack/railtie.rb
|
68
68
|
- lib/repack/version.rb
|
69
69
|
- lib/tasks/webpack.rake
|
70
|
-
homepage: https://github.com/cottonwoodcoding/
|
70
|
+
homepage: https://github.com/cottonwoodcoding/repack
|
71
71
|
licenses:
|
72
72
|
- MIT
|
73
73
|
metadata: {}
|