mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Require assets in all environments by default and provide a way to opt-out from uglifier.
This commit is contained in:
@@ -70,8 +70,13 @@ module Sprockets
|
||||
if assets.compress
|
||||
# temporarily hardcode default JS compressor to uglify. Soon, it will work
|
||||
# the same as SCSS, where a default plugin sets the default.
|
||||
env.js_compressor = LazyCompressor.new { expand_js_compressor(assets.js_compressor || :uglifier) }
|
||||
env.css_compressor = LazyCompressor.new { expand_css_compressor(assets.css_compressor) }
|
||||
unless assets.js_compressor == false
|
||||
env.js_compressor = LazyCompressor.new { expand_js_compressor(assets.js_compressor || :uglifier) }
|
||||
end
|
||||
|
||||
unless assets.css_compressor == false
|
||||
env.css_compressor = LazyCompressor.new { expand_css_compressor(assets.css_compressor) }
|
||||
end
|
||||
end
|
||||
|
||||
env
|
||||
|
||||
@@ -15,7 +15,7 @@ require "active_resource/railtie"
|
||||
# If you have a Gemfile, require the default gems, the ones in the
|
||||
# current environment and also include :assets gems if in development
|
||||
# or test environments.
|
||||
Bundler.require *Rails.groups(:assets => %w(development test)) if defined?(Bundler)
|
||||
Bundler.require *Rails.groups(:assets) if defined?(Bundler)
|
||||
|
||||
module <%= app_const_base %>
|
||||
class Application < Rails::Application
|
||||
|
||||
Reference in New Issue
Block a user