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

Uglifier should not be included when generating a new app with `--skip-javascript` #25919

Merged
merged 1 commit into from Jul 26, 2016

Conversation

Projects
None yet
7 participants
@benpickles
Contributor

benpickles commented Jul 22, 2016

Summary

When generating a new Rails app with --skip-javascript it includes the Uglifier gem and config which seems erroneous. This pull request ensures that these are not included when generating a new app with --skip-javascript.

@rails-bot

This comment has been minimized.

Show comment
Hide comment
@rails-bot

rails-bot Jul 22, 2016

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @schneems (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.

rails-bot commented Jul 22, 2016

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @schneems (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.

@maclover7 maclover7 added the railties label Jul 22, 2016

@benpickles

This comment has been minimized.

Show comment
Hide comment
@benpickles

benpickles Jul 26, 2016

Contributor

Tests now pass - I think due to #25925.

Contributor

benpickles commented Jul 26, 2016

Tests now pass - I think due to #25925.

Show outdated Hide outdated ...ails/generators/rails/app/templates/config/environments/production.rb.tt
@@ -20,7 +20,9 @@ Rails.application.configure do
<%- unless options.skip_sprockets? -%>
# Compress JavaScripts and CSS.
<%- unless options.skip_javascript? -%>

This comment has been minimized.

@robin850

robin850 Jul 26, 2016

Member

This is really nit-picky but what do you think about:

<%- unless options.skip_sprockets? -%>
<%- unless options.skip_javascript? -%>
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
<%- else -%>
# Compress CSS.
<%- end -%>
@robin850

robin850 Jul 26, 2016

Member

This is really nit-picky but what do you think about:

<%- unless options.skip_sprockets? -%>
<%- unless options.skip_javascript? -%>
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
<%- else -%>
# Compress CSS.
<%- end -%>

This comment has been minimized.

@benpickles

benpickles Jul 26, 2016

Contributor

It's the right thing to do :| I'll update.

@benpickles

benpickles Jul 26, 2016

Contributor

It's the right thing to do :| I'll update.

This comment has been minimized.

@benpickles

benpickles Jul 26, 2016

Contributor

Sorted.

@benpickles

benpickles Jul 26, 2016

Contributor

Sorted.

@spastorino

This comment has been minimized.

Show comment
Hide comment
@spastorino

spastorino Jul 26, 2016

Member

Can you add a CHANGELOG entry, please?

Member

spastorino commented Jul 26, 2016

Can you add a CHANGELOG entry, please?

@benpickles

This comment has been minimized.

Show comment
Hide comment
@benpickles

benpickles Jul 26, 2016

Contributor

Sorry, sorted.

Contributor

benpickles commented Jul 26, 2016

Sorry, sorted.

@guilleiguaran

This comment has been minimized.

Show comment
Hide comment
@guilleiguaran

guilleiguaran Jul 26, 2016

Member

Great work on this 👏

Member

guilleiguaran commented Jul 26, 2016

Great work on this 👏

@guilleiguaran guilleiguaran merged commit cbc61f5 into rails:master Jul 26, 2016

1 check passed

codeclimate Code Climate didn't find any new or fixed issues.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment