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

Merged
merged 1 commit into from Jul 26, 2016

Projects

None yet

7 participants

@benpickles
Contributor

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.

@schneems schneems was assigned by rails-bot Jul 22, 2016
@rails-bot

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
Contributor

Tests now pass - I think due to #25925.

@robin850 robin850 and 1 other commented on an outdated diff Jul 26, 2016
...ls/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? -%>
@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 -%>
@benpickles
benpickles Jul 26, 2016 Contributor

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

@benpickles
benpickles Jul 26, 2016 Contributor

Sorted.

@spastorino
Member

Can you add a CHANGELOG entry, please?

@benpickles
Contributor

Sorry, sorted.

@guilleiguaran
Member
guilleiguaran commented Jul 26, 2016 edited

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