Commit fc024b6
Move shared precompile hook to spec/support and simplify generator template
Address feedback to properly organize the precompile hook code:
1. Move shared implementation to spec/support/ (test-only location)
- Renamed: lib/tasks/precompile/shakapacker_precompile_hook_shared.rb
- To: spec/support/shakapacker_precompile_hook_shared.rb
- This makes it clear the shared code is only for test dummy apps
2. Simplify generator template to be standalone
- Remove logic to load shared implementation from gem
- Generator template is for newly created production apps
- Should be simple, self-contained, and production-ready
- No references to development/testing concerns
3. Update test dummy apps to reference new location
- spec/dummy/bin/shakapacker-precompile-hook
- react_on_rails_pro/spec/dummy/bin/shakapacker-precompile-hook
- Both now load from spec/support/
The generator template is now clean and focused on production use cases,
while test dummy apps share common implementation from the test support directory.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 64d14e8 commit fc024b6
File tree
4 files changed
+6
-22
lines changed- lib/generators/react_on_rails/templates/base/base/bin
- react_on_rails_pro/spec/dummy/bin
- spec
- dummy/bin
- support
4 files changed
+6
-22
lines changedLines changed: 0 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 14 | | |
31 | 15 | | |
32 | 16 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments