react_on_rails 12.0.3.beta.0 → 12.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) 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 +3 -3
  5. data/.github/workflows/main.yml +6 -6
  6. data/.github/workflows/package-js-tests.yml +2 -2
  7. data/.github/workflows/rspec-package-specs.yml +2 -2
  8. data/.prettierrc +0 -3
  9. data/.rubocop.yml +46 -38
  10. data/CHANGELOG.md +32 -13
  11. data/CONTRIBUTING.md +3 -2
  12. data/Gemfile +1 -33
  13. data/Gemfile.development_dependencies +51 -0
  14. data/NEWS.md +0 -1
  15. data/README.md +63 -55
  16. data/docs/{basics → additional-details}/generator-details.md +1 -6
  17. data/docs/{outdated → additional-details}/manual-installation-overview.md +6 -6
  18. data/docs/{basics → additional-details}/migrating-from-react-rails.md +0 -0
  19. data/docs/{additional-reading → additional-details}/recommended-project-structure.md +0 -0
  20. data/docs/{additional-reading → additional-details}/updating-dependencies.md +0 -0
  21. data/docs/additional-details/upgrade-webpacker-v3-to-v4.md +10 -0
  22. data/docs/api/javascript-api.md +2 -2
  23. data/docs/api/redux-store-api.md +3 -3
  24. data/docs/api/view-helpers-api.md +7 -8
  25. data/docs/basics/client-vs-server-rendering.md +3 -3
  26. data/docs/basics/configuration.md +42 -25
  27. data/docs/basics/deployment.md +2 -2
  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 +4 -1
  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 +30 -11
  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/react_component/render_options.rb +16 -7
  84. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +8 -6
  85. data/lib/react_on_rails/test_helper.rb +2 -0
  86. data/lib/react_on_rails/test_helper/webpack_assets_compiler.rb +1 -1
  87. data/lib/react_on_rails/utils.rb +19 -3
  88. data/lib/react_on_rails/version.rb +1 -1
  89. data/lib/react_on_rails/webpacker_utils.rb +5 -1
  90. data/lib/tasks/assets.rake +20 -11
  91. data/package.json +24 -29
  92. data/rakelib/docker.rake +0 -5
  93. data/rakelib/lint.rake +3 -9
  94. data/rakelib/release.rake +29 -15
  95. data/rakelib/run_rspec.rake +10 -11
  96. data/rakelib/task_helpers.rb +16 -4
  97. data/react_on_rails.gemspec +3 -17
  98. data/yarn.lock +2549 -5169
  99. metadata +48 -228
  100. data/.release-it.json +0 -3
  101. data/docs/additional-reading/upgrade-webpacker-v3-to-v4.md +0 -10
  102. data/docs/additional-reading/webpack-dev-server.md +0 -15
  103. 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.3.beta.0
4
+ version: 12.2.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-09-03 00:00:00.000000000 Z
11
+ date: 2021-03-25 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
@@ -326,7 +144,6 @@ files:
326
144
  - ".npmignore"
327
145
  - ".prettierignore"
328
146
  - ".prettierrc"
329
- - ".release-it.json"
330
147
  - ".rspec"
331
148
  - ".rubocop.yml"
332
149
  - ".scss-lint.yml"
@@ -335,6 +152,7 @@ files:
335
152
  - CONTRIBUTING.md
336
153
  - Dockerfile_tests
337
154
  - Gemfile
155
+ - Gemfile.development_dependencies
338
156
  - KUDOS.md
339
157
  - LICENSE.md
340
158
  - NEWS.md
@@ -346,68 +164,70 @@ files:
346
164
  - app/helpers/react_on_rails_helper.rb
347
165
  - book.json
348
166
  - docker-compose.yml
349
- - docs/additional-reading/angular-js-integration-migration.md
350
- - docs/additional-reading/asset-pipeline.md
351
- - docs/additional-reading/capistrano-deployment.md
352
- - docs/additional-reading/convert-rails-5-api-only-app.md
353
- - docs/additional-reading/converting-from-custom-webpack-config-to-rails-webpacker-config.md
354
- - docs/additional-reading/credits.md
355
- - docs/additional-reading/elastic-beanstalk.md
356
- - docs/additional-reading/foreman-issues.md
357
- - docs/additional-reading/images.md
358
- - docs/additional-reading/node-dependencies-and-npm.md
359
- - docs/additional-reading/rails-engine-integration.md
360
- - docs/additional-reading/rails_view_rendering_from_inline_javascript.md
361
- - docs/additional-reading/react-and-redux.md
362
- - docs/additional-reading/react-helmet.md
363
- - docs/additional-reading/react-router.md
364
- - docs/additional-reading/recommended-project-structure.md
365
- - docs/additional-reading/server-rendering-tips.md
366
- - docs/additional-reading/tips.md
367
- - docs/additional-reading/troubleshooting-when-using-webpacker.md
368
- - docs/additional-reading/turbolinks.md
369
- - docs/additional-reading/updating-dependencies.md
370
- - docs/additional-reading/upgrade-webpacker-v3-to-v4.md
371
- - docs/additional-reading/webpack-dev-server.md
372
- - docs/additional-reading/webpack-v1-notes.md
373
- - docs/additional-reading/webpack.md
167
+ - docs/additional-details/generator-details.md
168
+ - docs/additional-details/manual-installation-overview.md
169
+ - docs/additional-details/migrating-from-react-rails.md
170
+ - docs/additional-details/recommended-project-structure.md
171
+ - docs/additional-details/updating-dependencies.md
172
+ - docs/additional-details/upgrade-webpacker-v3-to-v4.md
374
173
  - docs/api/javascript-api.md
375
174
  - docs/api/redux-store-api.md
376
175
  - docs/api/view-helpers-api.md
377
- - docs/articles.md
378
176
  - docs/basics/client-vs-server-rendering.md
379
177
  - docs/basics/configuration.md
380
178
  - docs/basics/deployment.md
381
- - docs/basics/generator-details.md
382
- - docs/basics/heroku-deployment.md
383
179
  - docs/basics/hmr-and-hot-reloading-with-the-webpack-dev-server.md
180
+ - docs/basics/how-react-on-rails-works.md
384
181
  - docs/basics/i18n.md
385
182
  - docs/basics/installation-into-an-existing-rails-app.md
386
- - docs/basics/migrating-from-react-rails.md
387
183
  - docs/basics/minitest-configuration.md
388
184
  - docs/basics/react-server-rendering.md
389
185
  - docs/basics/render-functions-and-railscontext.md
390
186
  - docs/basics/rspec-configuration.md
187
+ - docs/basics/tutorial.md
391
188
  - docs/basics/upgrading-react-on-rails.md
392
189
  - docs/basics/webpack-configuration.md
393
- - docs/coding-style/style.md
394
190
  - docs/contributor-info/errors-with-hooks.md
395
191
  - docs/contributor-info/generator-testing.md
396
192
  - docs/contributor-info/linters.md
397
193
  - docs/contributor-info/pull-requests.md
398
194
  - docs/contributor-info/releasing.md
195
+ - docs/deployment/elastic-beanstalk.md
196
+ - docs/deployment/heroku-deployment.md
197
+ - docs/home.md
198
+ - docs/javascript/angular-js-integration-migration.md
199
+ - docs/javascript/asset-pipeline.md
200
+ - docs/javascript/capistrano-deployment.md
201
+ - docs/javascript/code-splitting.md
202
+ - docs/javascript/converting-from-custom-webpack-config-to-rails-webpacker-config.md
203
+ - docs/javascript/credits.md
204
+ - docs/javascript/foreman-issues.md
205
+ - docs/javascript/images.md
206
+ - docs/javascript/node-dependencies-and-npm.md
207
+ - docs/javascript/react-and-redux.md
208
+ - docs/javascript/react-helmet.md
209
+ - docs/javascript/react-router.md
210
+ - docs/javascript/server-rendering-tips.md
211
+ - docs/javascript/troubleshooting-when-using-webpacker.md
212
+ - docs/javascript/webpack-v1-notes.md
213
+ - docs/javascript/webpack.md
214
+ - docs/misc/articles.md
399
215
  - docs/misc/code_of_conduct.md
400
216
  - docs/misc/doctrine.md
401
- - docs/outdated/code-splitting.md
402
- - docs/outdated/how-react-on-rails-works.md
403
- - docs/outdated/manual-installation-overview.md
217
+ - docs/misc/style.md
218
+ - docs/misc/tips.md
219
+ - docs/outdated/deferred-rendering.md
404
220
  - docs/outdated/rails-assets-relative-paths.md
405
221
  - docs/outdated/rails-assets.md
406
222
  - docs/outdated/rails3.md
223
+ - docs/rails-webpacker-react-integration-options.md
224
+ - docs/rails/convert-rails-5-api-only-app.md
225
+ - docs/rails/rails-engine-integration.md
226
+ - docs/rails/rails_view_rendering_from_inline_javascript.md
227
+ - docs/rails/turbolinks.md
407
228
  - docs/testimonials/hvmn.md
408
229
  - docs/testimonials/resortpass.md
409
230
  - docs/testimonials/testimonials.md
410
- - docs/tutorial.md
411
231
  - jest.config.js
412
232
  - lib/generators/USAGE
413
233
  - lib/generators/react_on_rails/base_generator.rb
@@ -428,10 +248,10 @@ files:
428
248
  - lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb
429
249
  - lib/generators/react_on_rails/templates/dev_tests/.eslintrc
430
250
  - lib/generators/react_on_rails/templates/dev_tests/.rspec
431
- - lib/generators/react_on_rails/templates/dev_tests/spec/features/hello_world_spec.rb
432
251
  - lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb
433
252
  - lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb
434
253
  - lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb
254
+ - lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
435
255
  - lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/actions/helloWorldActionCreators.js
436
256
  - lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx
437
257
  - lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/constants/helloWorldConstants.js
@@ -480,7 +300,6 @@ files:
480
300
  - rakelib/run_rspec.rake
481
301
  - rakelib/task_helpers.rb
482
302
  - react_on_rails.gemspec
483
- - ruby-lint.yml
484
303
  - script/bootstrap
485
304
  - script/release
486
305
  - script/setup
@@ -495,8 +314,9 @@ metadata: {}
495
314
  post_install_message: |2
496
315
 
497
316
  --------------------------------------------------------------------------------
498
- Email contact@shakacode.com for access to our slack room and information about our "pro support plan"
499
- which supports better performance, via caching helpers and our node rendering server.
317
+ Checkout https://www.shakacode.com/react-on-rails-pro for information about
318
+ "React on Rails Pro" which includes one hour a month of support and a gem for
319
+ better performance, via caching helpers, and our node rendering server.
500
320
  --------------------------------------------------------------------------------
501
321
  rdoc_options: []
502
322
  require_paths:
@@ -508,12 +328,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
508
328
  version: 2.5.0
509
329
  required_rubygems_version: !ruby/object:Gem::Requirement
510
330
  requirements:
511
- - - ">"
331
+ - - ">="
512
332
  - !ruby/object:Gem::Version
513
- version: 1.3.1
333
+ version: '0'
514
334
  requirements: []
515
- rubygems_version: 3.0.8
516
- signing_key:
335
+ rubygems_version: 3.1.4
336
+ signing_key:
517
337
  specification_version: 4
518
338
  summary: Rails with react server rendering with webpack.
519
339
  test_files: []
data/.release-it.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "requireCleanWorkingDir": false
3
- }
@@ -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