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

Install JavaScript dependencies on bin/update #30614

Merged
merged 1 commit into from Sep 27, 2017

Conversation

zenizh
Copy link
Contributor

@zenizh zenizh commented Sep 15, 2017

Summary

refs c873746

On above commit aimed to comment out the calling of bin/yarn but it was removed from bin/update in spite of remaining in bin/setup.

I think it is helpful to us who are using yarn if generated bin/update has this code.

@rails-bot
Copy link

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.

@javan
Copy link
Contributor

javan commented Sep 17, 2017

r? @dhh

@rails-bot rails-bot assigned dhh and unassigned javan Sep 17, 2017
<% unless options.skip_yarn? -%>

# Install JavaScript dependencies if using Yarn
# system('bin/yarn')
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@javan javan merged commit 35ecf46 into rails:master Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants