diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-22 18:00:19 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-22 18:06:59 +0200 |
commit | 59ce0f695bcbcb903effa490e7aa56fc86e22172 (patch) | |
tree | 836af27cfb095983b556eeda466bd32ea06c3ffc /railties | |
parent | dab96a267eeccd7380ad99fa19cefdfd3cd5ad2b (diff) | |
download | rails-59ce0f695bcbcb903effa490e7aa56fc86e22172.tar.gz rails-59ce0f695bcbcb903effa490e7aa56fc86e22172.tar.bz2 rails-59ce0f695bcbcb903effa490e7aa56fc86e22172.zip |
Turn on JS/CSS compression by default
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 1 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 0cee7deb72..141d9fd15c 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -8,6 +8,7 @@ source 'http://rubygems.org' <%= "gem 'json'\n" if RUBY_VERSION < "1.9.2" -%> gem 'sass', '~> 3.1.0.alpha' gem 'coffee-script' +gem 'uglifier' # Use unicorn as the web server # gem 'unicorn' 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 80951cf73a..b00f10c545 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 @@ -15,6 +15,10 @@ # (comment out if your front-end server doesn't support this) config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx + # Compress both stylesheets and JavaScripts + config.assets.js_compressor = :uglifier + config.assets.css_compressor = :scss + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true |