Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Rails-Turbo #497

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions variants/frontend-base/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,14 @@
sass
sass-loader
]

# Setup Turbo
yarn_add_dependencies %w[
@hotwired/turbo-rails
]
Comment on lines +103 to +106
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: this is installing the same package twice

Suggested change
# Setup Turbo
yarn_add_dependencies %w[
@hotwired/turbo-rails
]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh. Typo from me. I won't keep your suggestion because I wanted Turbo to be in it's own part of the file but I will remove the duplication

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok but that means we're running yarn install yet again which has it re-do a bunch more work - I know its not the biggest deal in the context of the template, but imo its still silly when the line immediately before it is doing an install...

I'll not block over it though 🤷

prepend_to_file "app/frontend/packs/application.js" do
<<~EO_CONTENT

import "@hotwired/turbo-rails"
EO_CONTENT
end
Loading