aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authortomhuda <tomhuda@strobecorp.com>2011-05-23 23:32:34 -0700
committerwycats <wycats@gmail.com>2011-05-24 16:04:28 -0700
commit88cb89056bbdf970031a85437265c45b4007d1b6 (patch)
tree65101b7e5d101000573dd0e8299a5ccb45b883d0 /railties
parent4b86e7bab06ef24870e593a3885ae568645b8940 (diff)
downloadrails-88cb89056bbdf970031a85437265c45b4007d1b6.tar.gz
rails-88cb89056bbdf970031a85437265c45b4007d1b6.tar.bz2
rails-88cb89056bbdf970031a85437265c45b4007d1b6.zip
Change compressor API so that plugins can register default compressors for their stylesheet or JS engines and still allow the user to turn off compression
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt6
2 files changed, 7 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
index 066aa54862..dcf4ace264 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
@@ -21,4 +21,7 @@
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
+
+ # Do not compress assets
+ config.assets.compress = false
end
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
index 1c3dc1117f..60e26755fe 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
@@ -11,9 +11,11 @@
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
- # Compress both stylesheets and JavaScripts
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Specify the default JavaScript compressor
config.assets.js_compressor = :uglifier
- config.assets.css_compressor = :scss
# Specifies the header that your server uses for sending files
# (comment out if your front-end server doesn't support this)