Commit 9013a13
## Summary
Fixes two rake tasks that were broken/discovered after the workspace
structure changes in PR #1830:
• **`node_package.rake`**: Fixed `yalc publish` → `yarn yalc publish` to
work with private workspace root
• **`shakapacker_examples.rake`**: Fixed missing space in rails command
+ updated to use `npm install` instead of `yarn`
## Issues Found
1. **`yalc publish` fails with private workspace root**: After PR #1830
made root package.json private (standard practice), `yalc publish` fails
with "Will not publish package with `private: true`"
- **Fix**: Use `yarn yalc publish` which delegates to the publishable
workspace package
2. **Rails command syntax error**: Missing space in `rails_options +=
"--skip-javascript"` caused `webpack--skip-javascript`
- **Fix**: Add space: `rails_options += " --skip-javascript"`
3. **Package manager mismatch**: Rake task runs `yarn` but Shakapacker
now defaults to `npm` when no lockfiles exist
- **Fix**: Use `npm install` to match Shakapacker's choice
## Test Plan
- [x] `rake node_package` - Successfully builds and publishes with yalc
- [x] `rake shakapacker_examples:gen_basic` - Successfully generates
Rails app with React on Rails
- [x] Manual testing confirmed all three fixes work together
## Root Cause
The workspace restructuring in PR #1830 was correct and follows standard
practices. These rake tasks simply needed updates to work with the new
structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/shakacode/react_on_rails/1839)
<!-- Reviewable:end -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- Bug Fixes
- Fixed example generator so CLI options (e.g., skipping JavaScript) are
applied reliably during project creation.
- Chores
- Switched example project dependency installation from Yarn to npm for
consistency.
- Standardized package publishing to run via Yarn after the build step.
These updates improve example generation reliability and align tooling
across workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Judah Meek <[email protected]>
1 parent 12151f9 commit 9013a13
2 files changed
+4
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 39 | + | |
| 40 | + | |
57 | 41 | | |
58 | 42 | | |
59 | 43 | | |
| |||
0 commit comments