react_on_rails 12.0.2 → 12.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +12 -2
  3. data/.eslintrc +2 -1
  4. data/.github/workflows/lint-js-and-ruby.yml +53 -0
  5. data/.github/workflows/main.yml +178 -0
  6. data/.github/workflows/package-js-tests.yml +35 -0
  7. data/.github/workflows/rspec-package-specs.yml +45 -0
  8. data/.prettierrc +0 -3
  9. data/.rubocop.yml +46 -38
  10. data/CHANGELOG.md +35 -12
  11. data/CONTRIBUTING.md +4 -3
  12. data/Gemfile +1 -33
  13. data/Gemfile.development_dependencies +51 -0
  14. data/README.md +63 -55
  15. data/docs/{basics → additional-details}/generator-details.md +1 -6
  16. data/docs/{outdated → additional-details}/manual-installation-overview.md +6 -6
  17. data/docs/{basics → additional-details}/migrating-from-react-rails.md +0 -0
  18. data/docs/{additional-reading → additional-details}/recommended-project-structure.md +0 -0
  19. data/docs/{additional-reading → additional-details}/updating-dependencies.md +0 -0
  20. data/docs/additional-details/upgrade-webpacker-v3-to-v4.md +10 -0
  21. data/docs/api/javascript-api.md +2 -2
  22. data/docs/api/redux-store-api.md +3 -3
  23. data/docs/api/view-helpers-api.md +7 -8
  24. data/docs/basics/client-vs-server-rendering.md +3 -3
  25. data/docs/basics/configuration.md +42 -25
  26. data/docs/basics/deployment.md +2 -2
  27. data/docs/basics/hmr-and-hot-reloading-with-the-webpack-dev-server.md +16 -14
  28. data/docs/{outdated → basics}/how-react-on-rails-works.md +8 -9
  29. data/docs/basics/installation-into-an-existing-rails-app.md +13 -6
  30. data/docs/basics/react-server-rendering.md +3 -3
  31. data/docs/basics/rspec-configuration.md +10 -10
  32. data/docs/{tutorial.md → basics/tutorial.md} +23 -31
  33. data/docs/basics/upgrading-react-on-rails.md +32 -12
  34. data/docs/basics/webpack-configuration.md +4 -6
  35. data/docs/contributor-info/linters.md +5 -6
  36. data/docs/contributor-info/pull-requests.md +2 -4
  37. data/docs/contributor-info/releasing.md +1 -1
  38. data/docs/{additional-reading → deployment}/elastic-beanstalk.md +0 -0
  39. data/docs/{basics → deployment}/heroku-deployment.md +0 -0
  40. data/docs/home.md +382 -0
  41. data/docs/{additional-reading → javascript}/angular-js-integration-migration.md +0 -0
  42. data/docs/{additional-reading → javascript}/asset-pipeline.md +0 -0
  43. data/docs/{additional-reading → javascript}/capistrano-deployment.md +0 -0
  44. data/docs/{outdated → javascript}/code-splitting.md +5 -5
  45. data/docs/{additional-reading → javascript}/converting-from-custom-webpack-config-to-rails-webpacker-config.md +3 -3
  46. data/docs/{additional-reading → javascript}/credits.md +0 -0
  47. data/docs/{additional-reading → javascript}/foreman-issues.md +0 -0
  48. data/docs/{additional-reading → javascript}/images.md +5 -6
  49. data/docs/{additional-reading → javascript}/node-dependencies-and-npm.md +0 -0
  50. data/docs/{additional-reading → javascript}/react-and-redux.md +0 -0
  51. data/docs/{additional-reading → javascript}/react-helmet.md +0 -0
  52. data/docs/{additional-reading → javascript}/react-router.md +0 -0
  53. data/docs/{additional-reading → javascript}/server-rendering-tips.md +0 -0
  54. data/docs/{additional-reading → javascript}/troubleshooting-when-using-webpacker.md +0 -0
  55. data/docs/{additional-reading → javascript}/webpack-v1-notes.md +0 -0
  56. data/docs/{additional-reading → javascript}/webpack.md +0 -0
  57. data/docs/{articles.md → misc/articles.md} +1 -1
  58. data/docs/misc/doctrine.md +5 -5
  59. data/docs/{coding-style → misc}/style.md +0 -0
  60. data/docs/{additional-reading → misc}/tips.md +0 -0
  61. data/docs/outdated/deferred-rendering.md +39 -0
  62. data/docs/outdated/rails-assets-relative-paths.md +3 -3
  63. data/docs/outdated/rails-assets.md +8 -8
  64. data/docs/outdated/rails3.md +2 -2
  65. data/docs/rails-webpacker-react-integration-options.md +182 -0
  66. data/docs/{additional-reading → rails}/convert-rails-5-api-only-app.md +1 -1
  67. data/docs/{additional-reading → rails}/rails-engine-integration.md +0 -0
  68. data/docs/{additional-reading → rails}/rails_view_rendering_from_inline_javascript.md +0 -0
  69. data/docs/{additional-reading → rails}/turbolinks.md +0 -0
  70. data/docs/testimonials/testimonials.md +6 -6
  71. data/lib/generators/react_on_rails/base_generator.rb +8 -1
  72. data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -1
  73. data/lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb +8 -2
  74. data/lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb +1 -1
  75. data/lib/generators/react_on_rails/templates/dev_tests/spec/{features → system}/hello_world_spec.rb +2 -2
  76. data/lib/react_on_rails/configuration.rb +2 -0
  77. data/lib/react_on_rails/git_utils.rb +3 -3
  78. data/lib/react_on_rails/helper.rb +15 -9
  79. data/lib/react_on_rails/locales/base.rb +3 -3
  80. data/lib/react_on_rails/locales/to_js.rb +0 -4
  81. data/lib/react_on_rails/locales/to_json.rb +0 -4
  82. data/lib/react_on_rails/prerender_error.rb +1 -1
  83. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +6 -6
  84. data/lib/react_on_rails/test_helper.rb +2 -0
  85. data/lib/react_on_rails/test_helper/webpack_assets_compiler.rb +1 -1
  86. data/lib/react_on_rails/utils.rb +19 -3
  87. data/lib/react_on_rails/version.rb +1 -1
  88. data/lib/react_on_rails/webpacker_utils.rb +5 -1
  89. data/lib/tasks/assets.rake +20 -11
  90. data/package.json +24 -29
  91. data/rakelib/docker.rake +0 -5
  92. data/rakelib/lint.rake +3 -9
  93. data/rakelib/release.rake +27 -13
  94. data/rakelib/run_rspec.rake +10 -11
  95. data/rakelib/task_helpers.rb +16 -4
  96. data/react_on_rails.gemspec +3 -17
  97. data/yarn.lock +2272 -4960
  98. metadata +50 -225
  99. data/docs/additional-reading/upgrade-webpacker-v3-to-v4.md +0 -10
  100. data/docs/additional-reading/webpack-dev-server.md +0 -15
  101. data/ruby-lint.yml +0 -25
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: 12.0.2
4
+ version: 12.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-26 00:00:00.000000000 Z
11
+ date: 2021-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '4.0'
97
- - !ruby/object:Gem::Dependency
98
- name: awesome_print
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: bundler
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -122,20 +108,6 @@ dependencies:
122
108
  - - "~>"
123
109
  - !ruby/object:Gem::Version
124
110
  version: '2'
125
- - !ruby/object:Gem::Dependency
126
- name: coveralls
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
111
  - !ruby/object:Gem::Dependency
140
112
  name: gem-release
141
113
  requirement: !ruby/object:Gem::Requirement
@@ -150,160 +122,6 @@ dependencies:
150
122
  - - ">="
151
123
  - !ruby/object:Gem::Version
152
124
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: generator_spec
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: listen
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: pry
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
- - !ruby/object:Gem::Dependency
196
- name: pry-byebug
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: '0'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: '0'
209
- - !ruby/object:Gem::Dependency
210
- name: pry-doc
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
- - !ruby/object:Gem::Dependency
224
- name: pry-rescue
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - ">="
228
- - !ruby/object:Gem::Version
229
- version: '0'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - ">="
235
- - !ruby/object:Gem::Version
236
- version: '0'
237
- - !ruby/object:Gem::Dependency
238
- name: pry-state
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - ">="
242
- - !ruby/object:Gem::Version
243
- version: '0'
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - ">="
249
- - !ruby/object:Gem::Version
250
- version: '0'
251
- - !ruby/object:Gem::Dependency
252
- name: rails
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - "~>"
256
- - !ruby/object:Gem::Version
257
- version: '5.2'
258
- type: :development
259
- prerelease: false
260
- version_requirements: !ruby/object:Gem::Requirement
261
- requirements:
262
- - - "~>"
263
- - !ruby/object:Gem::Version
264
- version: '5.2'
265
- - !ruby/object:Gem::Dependency
266
- name: rake
267
- requirement: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - "~>"
270
- - !ruby/object:Gem::Version
271
- version: '10.0'
272
- type: :development
273
- prerelease: false
274
- version_requirements: !ruby/object:Gem::Requirement
275
- requirements:
276
- - - "~>"
277
- - !ruby/object:Gem::Version
278
- version: '10.0'
279
- - !ruby/object:Gem::Dependency
280
- name: rspec
281
- requirement: !ruby/object:Gem::Requirement
282
- requirements:
283
- - - ">="
284
- - !ruby/object:Gem::Version
285
- version: '0'
286
- type: :development
287
- prerelease: false
288
- version_requirements: !ruby/object:Gem::Requirement
289
- requirements:
290
- - - ">="
291
- - !ruby/object:Gem::Version
292
- version: '0'
293
- - !ruby/object:Gem::Dependency
294
- name: rubocop
295
- requirement: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - '='
298
- - !ruby/object:Gem::Version
299
- version: 0.85.0
300
- type: :development
301
- prerelease: false
302
- version_requirements: !ruby/object:Gem::Requirement
303
- requirements:
304
- - - '='
305
- - !ruby/object:Gem::Version
306
- version: 0.85.0
307
125
  description: See README.md
308
126
  email:
309
127
  - justin@shakacode.com
@@ -318,6 +136,10 @@ files:
318
136
  - ".eslintignore"
319
137
  - ".eslintrc"
320
138
  - ".github/FUNDING.yml"
139
+ - ".github/workflows/lint-js-and-ruby.yml"
140
+ - ".github/workflows/main.yml"
141
+ - ".github/workflows/package-js-tests.yml"
142
+ - ".github/workflows/rspec-package-specs.yml"
321
143
  - ".gitignore"
322
144
  - ".npmignore"
323
145
  - ".prettierignore"
@@ -331,6 +153,7 @@ files:
331
153
  - CONTRIBUTING.md
332
154
  - Dockerfile_tests
333
155
  - Gemfile
156
+ - Gemfile.development_dependencies
334
157
  - KUDOS.md
335
158
  - LICENSE.md
336
159
  - NEWS.md
@@ -342,68 +165,70 @@ files:
342
165
  - app/helpers/react_on_rails_helper.rb
343
166
  - book.json
344
167
  - docker-compose.yml
345
- - docs/additional-reading/angular-js-integration-migration.md
346
- - docs/additional-reading/asset-pipeline.md
347
- - docs/additional-reading/capistrano-deployment.md
348
- - docs/additional-reading/convert-rails-5-api-only-app.md
349
- - docs/additional-reading/converting-from-custom-webpack-config-to-rails-webpacker-config.md
350
- - docs/additional-reading/credits.md
351
- - docs/additional-reading/elastic-beanstalk.md
352
- - docs/additional-reading/foreman-issues.md
353
- - docs/additional-reading/images.md
354
- - docs/additional-reading/node-dependencies-and-npm.md
355
- - docs/additional-reading/rails-engine-integration.md
356
- - docs/additional-reading/rails_view_rendering_from_inline_javascript.md
357
- - docs/additional-reading/react-and-redux.md
358
- - docs/additional-reading/react-helmet.md
359
- - docs/additional-reading/react-router.md
360
- - docs/additional-reading/recommended-project-structure.md
361
- - docs/additional-reading/server-rendering-tips.md
362
- - docs/additional-reading/tips.md
363
- - docs/additional-reading/troubleshooting-when-using-webpacker.md
364
- - docs/additional-reading/turbolinks.md
365
- - docs/additional-reading/updating-dependencies.md
366
- - docs/additional-reading/upgrade-webpacker-v3-to-v4.md
367
- - docs/additional-reading/webpack-dev-server.md
368
- - docs/additional-reading/webpack-v1-notes.md
369
- - docs/additional-reading/webpack.md
168
+ - docs/additional-details/generator-details.md
169
+ - docs/additional-details/manual-installation-overview.md
170
+ - docs/additional-details/migrating-from-react-rails.md
171
+ - docs/additional-details/recommended-project-structure.md
172
+ - docs/additional-details/updating-dependencies.md
173
+ - docs/additional-details/upgrade-webpacker-v3-to-v4.md
370
174
  - docs/api/javascript-api.md
371
175
  - docs/api/redux-store-api.md
372
176
  - docs/api/view-helpers-api.md
373
- - docs/articles.md
374
177
  - docs/basics/client-vs-server-rendering.md
375
178
  - docs/basics/configuration.md
376
179
  - docs/basics/deployment.md
377
- - docs/basics/generator-details.md
378
- - docs/basics/heroku-deployment.md
379
180
  - docs/basics/hmr-and-hot-reloading-with-the-webpack-dev-server.md
181
+ - docs/basics/how-react-on-rails-works.md
380
182
  - docs/basics/i18n.md
381
183
  - docs/basics/installation-into-an-existing-rails-app.md
382
- - docs/basics/migrating-from-react-rails.md
383
184
  - docs/basics/minitest-configuration.md
384
185
  - docs/basics/react-server-rendering.md
385
186
  - docs/basics/render-functions-and-railscontext.md
386
187
  - docs/basics/rspec-configuration.md
188
+ - docs/basics/tutorial.md
387
189
  - docs/basics/upgrading-react-on-rails.md
388
190
  - docs/basics/webpack-configuration.md
389
- - docs/coding-style/style.md
390
191
  - docs/contributor-info/errors-with-hooks.md
391
192
  - docs/contributor-info/generator-testing.md
392
193
  - docs/contributor-info/linters.md
393
194
  - docs/contributor-info/pull-requests.md
394
195
  - docs/contributor-info/releasing.md
196
+ - docs/deployment/elastic-beanstalk.md
197
+ - docs/deployment/heroku-deployment.md
198
+ - docs/home.md
199
+ - docs/javascript/angular-js-integration-migration.md
200
+ - docs/javascript/asset-pipeline.md
201
+ - docs/javascript/capistrano-deployment.md
202
+ - docs/javascript/code-splitting.md
203
+ - docs/javascript/converting-from-custom-webpack-config-to-rails-webpacker-config.md
204
+ - docs/javascript/credits.md
205
+ - docs/javascript/foreman-issues.md
206
+ - docs/javascript/images.md
207
+ - docs/javascript/node-dependencies-and-npm.md
208
+ - docs/javascript/react-and-redux.md
209
+ - docs/javascript/react-helmet.md
210
+ - docs/javascript/react-router.md
211
+ - docs/javascript/server-rendering-tips.md
212
+ - docs/javascript/troubleshooting-when-using-webpacker.md
213
+ - docs/javascript/webpack-v1-notes.md
214
+ - docs/javascript/webpack.md
215
+ - docs/misc/articles.md
395
216
  - docs/misc/code_of_conduct.md
396
217
  - docs/misc/doctrine.md
397
- - docs/outdated/code-splitting.md
398
- - docs/outdated/how-react-on-rails-works.md
399
- - docs/outdated/manual-installation-overview.md
218
+ - docs/misc/style.md
219
+ - docs/misc/tips.md
220
+ - docs/outdated/deferred-rendering.md
400
221
  - docs/outdated/rails-assets-relative-paths.md
401
222
  - docs/outdated/rails-assets.md
402
223
  - docs/outdated/rails3.md
224
+ - docs/rails-webpacker-react-integration-options.md
225
+ - docs/rails/convert-rails-5-api-only-app.md
226
+ - docs/rails/rails-engine-integration.md
227
+ - docs/rails/rails_view_rendering_from_inline_javascript.md
228
+ - docs/rails/turbolinks.md
403
229
  - docs/testimonials/hvmn.md
404
230
  - docs/testimonials/resortpass.md
405
231
  - docs/testimonials/testimonials.md
406
- - docs/tutorial.md
407
232
  - jest.config.js
408
233
  - lib/generators/USAGE
409
234
  - lib/generators/react_on_rails/base_generator.rb
@@ -424,10 +249,10 @@ files:
424
249
  - lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb
425
250
  - lib/generators/react_on_rails/templates/dev_tests/.eslintrc
426
251
  - lib/generators/react_on_rails/templates/dev_tests/.rspec
427
- - lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
428
252
  - lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb
429
253
  - lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb
430
254
  - lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb
255
+ - lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
431
256
  - lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/actions/helloWorldActionCreators.js
432
257
  - lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx
433
258
  - lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/constants/helloWorldConstants.js
@@ -476,7 +301,6 @@ files:
476
301
  - rakelib/run_rspec.rake
477
302
  - rakelib/task_helpers.rb
478
303
  - react_on_rails.gemspec
479
- - ruby-lint.yml
480
304
  - script/bootstrap
481
305
  - script/release
482
306
  - script/setup
@@ -491,8 +315,9 @@ metadata: {}
491
315
  post_install_message: |2
492
316
 
493
317
  --------------------------------------------------------------------------------
494
- Email contact@shakacode.com for access to our slack room and information about our "pro support plan"
495
- which supports better performance, via caching helpers and our node rendering server.
318
+ Checkout https://www.shakacode.com/react-on-rails-pro for information about
319
+ "React on Rails Pro" which includes one hour a month of support and a gem for
320
+ better performance, via caching helpers, and our node rendering server.
496
321
  --------------------------------------------------------------------------------
497
322
  rdoc_options: []
498
323
  require_paths:
@@ -508,8 +333,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
508
333
  - !ruby/object:Gem::Version
509
334
  version: '0'
510
335
  requirements: []
511
- rubygems_version: 3.0.8
512
- signing_key:
336
+ rubygems_version: 3.1.4
337
+ signing_key:
513
338
  specification_version: 4
514
339
  summary: Rails with react server rendering with webpack.
515
340
  test_files: []
@@ -1,10 +0,0 @@
1
- # Upgrading rails/webpacker v3.5 to v4
2
-
3
- The following steps can be followed to update a Webpacker v3.5 app to v4.
4
-
5
- 1. Update the gem `webpacker` and the package `@rails/webpacker`
6
- 1. Merge changes from the new default [.babelrc](../lib/install/config/.babelrc) to your `/.babelrc`. If you are using React, you need to add `"@babel/preset-react"`, to the list of `presets`.
7
- 1. Copy the file [.browserslistrc](../lib/install/config/.browserslistrc) to `/`.
8
- 1. Merge any differences between [config/webpacker.yml](../lib/install/config/webpacker.yml) and your `/config/webpacker.yml`.
9
-
10
- Here is an [example commit of these changes](https://github.com/shakacode/react_on_rails-tutorial-v11/pull/1/files).
@@ -1,15 +0,0 @@
1
- ## Developing with the Webpack Dev Server
2
- One of the benefits of using webpack is access to [webpack's dev server](https://webpack.github.io/docs/webpack-dev-server.html) and its [hot module replacement](https://webpack.github.io/docs/hot-module-replacement-with-webpack.html) functionality.
3
-
4
- The webpack dev server with HMR will apply changes from the code (or styles!) to the browser as soon as you save whatever file you're working on. You won't need to reload the page, and your data will still be there. Start foreman as normal (it boots up the Rails server *and* the webpack HMR dev server at the same time).
5
-
6
- ```bash
7
- foreman start -f Procfile.dev
8
- ```
9
-
10
- Open your browser to [localhost:3000](http://localhost:3000). Whenever you make changes to your JavaScript code in the `client` folder, they will automatically show up in the browser. Hot module replacement is already enabled by default.
11
-
12
- Note that **React-related error messages are possibly more helpful when encountered in the dev server** than the Rails server as they do not include noise added by the React on Rails gem.
13
-
14
- ### Adding Additional Routes for the Dev Server
15
- As you add more routes to your front-end application, you will need to make the corresponding API for the dev server in `client/server.js`. See our example `server.js` from our [tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client%2Fserver-express.js).
data/ruby-lint.yml DELETED
@@ -1,25 +0,0 @@
1
- # Not currently using ruby-lint
2
- ---
3
- presenter: syntastic
4
-
5
- # Be sure to edit this per your project!
6
- directories:
7
- - app
8
- - lib
9
- - spec
10
-
11
- ignore_paths:
12
- - client
13
- - node_modules
14
- - coverage
15
- - examples
16
-
17
- analysis_classes:
18
- # - argument_amount
19
- - pedantics
20
- - shadowing_variables
21
- # Too many false positives for these
22
- # - undefined_methods
23
- # - undefined_variables
24
- # - unused_variables
25
- - useless_equality_checks