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
Install JavaScript dependencies on bin/update #30614
Conversation
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @javan (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review. Please see the contribution instructions for more information. |
r? @dhh |
<% unless options.skip_yarn? -%> | ||
|
||
# Install JavaScript dependencies if using Yarn | ||
# system('bin/yarn') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended to be commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because even though we install yarn by default, it's not yet every app that actually needs to bundle JS assets every time. If we go all in on Webpacker for JS, that would change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question is: do we want to merge this change? Is bin/update
intended to be modified after creation? If not, I don't see the benefit of adding commented out code.
Perhaps bin/yarn
could run if package.json
is present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
bin/update
intended to be modified after creation?
Currently at least bin/setup
is intended to be modified after creation.
For consistency I think we should add this commented out code to bin/update
or remove the same code from bin/setup
.
https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/app/templates/bin/setup.tt#L18-L21
And this code is helpful for us who are using yarn so I think this should be kept.
Summary
refs c873746
On above commit aimed to comment out the calling of
bin/yarn
but it was removed frombin/update
in spite of remaining inbin/setup
.I think it is helpful to us who are using yarn if generated
bin/update
has this code.