Skip to content

Commit b713ce5

Browse files
justin808claude
andcommitted
Apply PR 2039 changes: modernize generator config and workflow updates
- Change yalc publish to yarn yalc publish in examples.yml - Enable build_test_command and add auto_load_bundle config - Add REACT_ON_RAILS_SKIP_VALIDATION wrapper for generator commands - Add generate_packs step after npm install in examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 37f5894 commit b713ce5

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest' && '--frozen-lockfile' || '' }}
122122
sudo yarn global add yalc
123123
- name: yalc publish for react-on-rails
124-
run: yalc publish
124+
run: yarn yalc publish
125125
- name: Install Ruby Gems for package
126126
run: |
127127
bundle lock --add-platform 'x86_64-linux'

lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ ReactOnRails.configure do |config|
2626
# - Requires adding ReactOnRails::TestHelper to spec/rails_helper.rb
2727
# - See: https://github.com/shakacode/react_on_rails/blob/master/docs/guides/testing-configuration.md
2828
#
29-
# config.build_test_command = "RAILS_ENV=test bin/shakapacker"
29+
config.build_test_command = "RAILS_ENV=test bin/shakapacker"
3030

31+
config.auto_load_bundle = true
32+
config.components_subdirectory = "ror_components"
3133
################################################################################
3234
# Advanced Configuration
3335
################################################################################

rakelib/shakapacker_examples.rake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ namespace :shakapacker_examples do # rubocop:disable Metrics/BlockLength
3636
sh_in_dir(example_type.dir, "echo \"gem 'shakapacker', '>= 8.2.0'\" >> #{example_type.gemfile}")
3737
bundle_install_in(example_type.dir)
3838
sh_in_dir(example_type.dir, "rake shakapacker:install")
39-
sh_in_dir(example_type.dir, example_type.generator_shell_commands)
39+
# TODO: Remove REACT_ON_RAILS_SKIP_VALIDATION after generators start using next release
40+
generator_commands = example_type.generator_shell_commands.map do |cmd|
41+
"REACT_ON_RAILS_SKIP_VALIDATION=true #{cmd}"
42+
end
43+
sh_in_dir(example_type.dir, generator_commands)
4044
sh_in_dir(example_type.dir, "npm install")
45+
sh_in_dir(example_type.dir, "bundle exec rake react_on_rails:generate_packs")
4146
end
4247
end
4348

0 commit comments

Comments
 (0)