react_on_rails 9.0.0.beta.8 → 9.0.0.beta.9
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/CHANGELOG.md +16 -7
- data/Gemfile +1 -1
- data/docs/additional-reading/rails-assets-relative-paths.md +1 -1
- data/docs/additional-reading/rspec-configuration.md +1 -1
- data/docs/api/ruby-api-hot-reload-view-helpers.md +1 -1
- data/lib/generators/react_on_rails/base_generator.rb +3 -3
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt +0 -6
- data/lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb.tt +1 -4
- data/lib/generators/react_on_rails/templates/base/base/client/webpack.config.js +1 -1
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt +2 -2
- data/lib/generators/react_on_rails/templates/base/base/config/webpacker.yml +2 -1
- data/lib/generators/react_on_rails/templates/node/base/client/node/package.json +1 -1
- data/lib/react_on_rails/configuration.rb +1 -1
- data/lib/react_on_rails/version.rb +1 -1
- data/package.json +1 -1
- data/rakelib/example_type.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: 2ba6646e46775e165a0d0f7c8e43de2dad2eb1fc
|
4
|
+
data.tar.gz: c422212818cb28ef17dffd3a7da41410099dce0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc8d53a1b6b89290382b2b12736116f33cf54d1bb7c8efb6f5b6ad45886bb534d4192709fb39fb7af11c2ae3ef0670477f36f8da7c9561ee835bc7efeb6e2b5d
|
7
|
+
data.tar.gz: 16e42224c49bbda250b2ecf3e23bb3eafb0d9f199d7991c0402433eafc48f38d8b4bb1175a35696493a54f244841f8c43e641e08e8107514943a8e05ade82656
|
data/CHANGELOG.md
CHANGED
@@ -18,7 +18,7 @@ All 9.0.0 beta versions can be viewed in [PR 908](https://github.com/shakacode/r
|
|
18
18
|
|
19
19
|
```rb
|
20
20
|
gem "webpacker", git: "https://github.com/shakacode/webpacker.git",
|
21
|
-
branch: "issue-464-merge-webpacker-lite-into-webpacker-
|
21
|
+
branch: "issue-464-merge-webpacker-lite-into-webpacker-v3"
|
22
22
|
```
|
23
23
|
|
24
24
|
- Update for the renaming in the `WebpackConfigLoader` in your webpack configuration.
|
@@ -54,6 +54,10 @@ gem "webpacker", git: "https://github.com/shakacode/webpacker.git",
|
|
54
54
|
|
55
55
|
|
56
56
|
- Find your `webpacker_lite.yml` and rename it to `webpacker.yml`
|
57
|
+
- Add a default setting
|
58
|
+
```
|
59
|
+
custom_compile: true
|
60
|
+
```
|
57
61
|
- Add a section like this under your development env:
|
58
62
|
```
|
59
63
|
dev_server:
|
@@ -75,16 +79,20 @@ gem "webpacker", git: "https://github.com/shakacode/webpacker.git",
|
|
75
79
|
|
76
80
|
|
77
81
|
#### Troubleshooting
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
Otherwise, you'll get an error that the bundle can't be found, because your Rails server thinks you are
|
82
|
-
deploying assets using the webpack-dev-server.
|
82
|
+
* Be sure to
|
83
|
+
|
83
84
|
|
84
85
|
|
85
86
|
### [9.0.0]
|
86
87
|
*Diffs for the beta to master*
|
87
88
|
|
89
|
+
### [9.0.0-beta.9]
|
90
|
+
- Fixes precompile task going to Webpacker's. You need to set `custom_compile: true` in your `webpacker.yml`.
|
91
|
+
- Changed webpack-bundle.js name to hello-world-bundle.js
|
92
|
+
- Update for latest from rails/webpacker
|
93
|
+
gem "webpacker", git: "https://github.com/shakacode/webpacker.git",
|
94
|
+
branch: "issue-464-merge-webpacker-lite-into-webpacker-v3"
|
95
|
+
|
88
96
|
### [9.0.0-beta.8]
|
89
97
|
- bugfix for server rendering
|
90
98
|
|
@@ -729,7 +737,8 @@ Best done with Object destructing:
|
|
729
737
|
- Fix several generator related issues.
|
730
738
|
|
731
739
|
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/rails-webpacker...9.0.0-beta.8
|
732
|
-
[9.0.0]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.
|
740
|
+
[9.0.0]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.9...master
|
741
|
+
[9.0.0-beta.9]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.9...9.0.0-beta.8
|
733
742
|
[9.0.0-beta.8]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.8...9.0.0-beta.7
|
734
743
|
[9.0.0-beta.7]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.7...9.0.0-beta.6
|
735
744
|
[9.0.0-beta.6]: https://github.com/shakacode/react_on_rails/compare/9.0.0-beta.6...9.0.0-beta.5
|
data/Gemfile
CHANGED
@@ -39,7 +39,7 @@ gem "launchy"
|
|
39
39
|
gem "poltergeist"
|
40
40
|
gem "selenium-webdriver"
|
41
41
|
gem "webpacker", git: "https://github.com/shakacode/webpacker.git",
|
42
|
-
branch: "issue-464-merge-webpacker-lite-into-webpacker-
|
42
|
+
branch: "issue-464-merge-webpacker-lite-into-webpacker-v3"
|
43
43
|
|
44
44
|
# TODO: remove once we get out of beta.
|
45
45
|
# gem 'webpacker', path: "../../forks/webpacker"
|
@@ -35,7 +35,7 @@ The following `config/react_on_rails.rb` settings **must** match your setup:
|
|
35
35
|
config.generated_assets_dir = File.join(%w[public webpack], Rails.env)
|
36
36
|
|
37
37
|
# Define the files we need to check for webpack compilation when running tests.
|
38
|
-
config.webpack_generated_files = %w(
|
38
|
+
config.webpack_generated_files = %w( hello-world-bundle.js )
|
39
39
|
|
40
40
|
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
|
41
41
|
# with rspec then this controls what yarn command is run
|
@@ -17,7 +17,7 @@ static vs. hot is picked based on whether `ENV["REACT_ON_RAILS_ENV"] == "HOT"`
|
|
17
17
|
<!-- This is to load the hot assets. -->
|
18
18
|
|
19
19
|
<!-- Note, you can have multiple files here. It's an array. -->
|
20
|
-
<%= env_javascript_include_tag(hot: ['http://localhost:3500/
|
20
|
+
<%= env_javascript_include_tag(hot: ['http://localhost:3500/hello-world-bundle.js]') %>
|
21
21
|
|
22
22
|
<!-- These do use turbolinks -->
|
23
23
|
<%= env_javascript_include_tag(static: 'application_static',
|
@@ -75,7 +75,7 @@ module ReactOnRails
|
|
75
75
|
|
76
76
|
gem 'mini_racer', platforms: :ruby
|
77
77
|
gem 'webpacker', git: "https://github.com/shakacode/webpacker.git",
|
78
|
-
branch: "issue-464-merge-webpacker-lite-into-webpacker-
|
78
|
+
branch: "issue-464-merge-webpacker-lite-into-webpacker-v3"
|
79
79
|
GEMS
|
80
80
|
append_to_file("Gemfile",
|
81
81
|
gems)
|
@@ -114,9 +114,9 @@ module ReactOnRails
|
|
114
114
|
|
115
115
|
What to do next:
|
116
116
|
|
117
|
-
- Include your webpack assets to your application layout.
|
117
|
+
- Include your webpack assets to your application layout. Change hello-world-bundle as needed.
|
118
118
|
|
119
|
-
|
119
|
+
<%= javascript_pack_tag 'hello-world-bundle' %>
|
120
120
|
|
121
121
|
- Ensure your bundle and yarn installs of dependencies are up to date.
|
122
122
|
|
@@ -1,9 +1,3 @@
|
|
1
|
-
# To ensure that Rails uses static assets rather than the webpack-dev-server
|
2
|
-
# you may set ENV value WEBPACKER_DEV_SERVER=FALSE or delete or comment out the dev_server section
|
3
|
-
# of config/webpacker.yml
|
4
|
-
# For example:
|
5
|
-
# web: WEBPACKER_DEV_SERVER=FALSE rails s -p 3000
|
6
|
-
|
7
1
|
web: rails s -p 3000
|
8
2
|
|
9
3
|
# Next line runs a watch process with webpack
|
data/lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb.tt
CHANGED
@@ -3,10 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<title>ReactOnRailsWithWebpacker</title>
|
5
5
|
<%%= csrf_meta_tags %>
|
6
|
-
|
7
|
-
<%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
8
|
-
<%%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
9
|
-
<%%= javascript_pack_tag 'webpack-bundle' %>
|
6
|
+
<%%= javascript_pack_tag 'hello-world-bundle' %>
|
10
7
|
</head>
|
11
8
|
|
12
9
|
<body>
|
data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt
CHANGED
@@ -7,13 +7,13 @@ ReactOnRails.configure do |config|
|
|
7
7
|
config.generated_assets_dir = File.join(%w[public webpack], Rails.env)
|
8
8
|
|
9
9
|
# Define the files we need to check for webpack compilation when running tests.
|
10
|
-
config.webpack_generated_files = %w(
|
10
|
+
config.webpack_generated_files = %w( hello-world-bundle.js )
|
11
11
|
|
12
12
|
# This is the file used for server rendering of React when using `(prerender: true)`
|
13
13
|
# If you are never using server rendering, you may set this to "".
|
14
14
|
# If you are using the same file for client and server rendering, having this set probably does
|
15
15
|
# not affect performance.
|
16
|
-
config.server_bundle_js_file = "
|
16
|
+
config.server_bundle_js_file = "hello-world-bundle.js"
|
17
17
|
|
18
18
|
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
|
19
19
|
# with rspec then this controls what yarn command is run
|
@@ -2,6 +2,7 @@
|
|
2
2
|
default: &default
|
3
3
|
# Critical to set compile as false for React on Rails projects
|
4
4
|
compile: false
|
5
|
+
custom_compile: true
|
5
6
|
|
6
7
|
development:
|
7
8
|
<<: *default
|
@@ -21,5 +22,5 @@ test:
|
|
21
22
|
|
22
23
|
production:
|
23
24
|
<<: *default
|
24
|
-
# generated files for
|
25
|
+
# generated files for production, in /public/webpack/production
|
25
26
|
public_output_path: webpack/production
|
@@ -59,7 +59,7 @@ module ReactOnRails
|
|
59
59
|
def self.ensure_webpack_generated_files_exists
|
60
60
|
return unless @configuration.webpack_generated_files.empty?
|
61
61
|
|
62
|
-
files = ["
|
62
|
+
files = ["hello-world-bundle.js"]
|
63
63
|
if @configuration.server_bundle_js_file.present?
|
64
64
|
files << @configuration.server_bundle_js_file
|
65
65
|
end
|
data/package.json
CHANGED
data/rakelib/example_type.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.0.beta.
|
4
|
+
version: 9.0.0.beta.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|