repack 2.0.2 → 2.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4624293302b6db413070d27664a91e80d3fa632
4
- data.tar.gz: 1c8ff313791c3263346814860ccb918d01862d58
3
+ metadata.gz: dc1385ce906fb131b6b5c8985085f67577b09231
4
+ data.tar.gz: a0ae25a40acf85c80a4f40b7ceb438b55bb54ec8
5
5
  SHA512:
6
- metadata.gz: c8fb44c51e8d06579b8fd21a1befd24d01aaee9b7f53fb1c1a7f6559a1a842a2e094cfaf4511f1721a5251fa134219e7074e8186a67e0a1ef7bd0e4e94a313f8
7
- data.tar.gz: 764e8309f692f7ec28de75127f755ff15954313a7ac5fab78d9c2c28eec5396c7c6aff25da6d47a5e9934c948dcee44f324984782b4e0fa5572778b308e53c1e
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 webpack-rails integration"
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
- def run_npm_install
93
- run "npm install" if yes?("Would you like us to run 'npm install' for you?")
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 'npm run dev_server' to run the webpack-dev-server
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. npm run heroku-setup
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
@@ -1,3 +1,3 @@
1
1
  module Repack
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.4"
3
3
  end
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.2
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/reapack
70
+ homepage: https://github.com/cottonwoodcoding/repack
71
71
  licenses:
72
72
  - MIT
73
73
  metadata: {}