Permalink
Browse files

Require assets in all environments by default and provide a way to op…

…t-out from uglifier.
  • Loading branch information...
1 parent 4c76991 commit 33f76e16699972f0a571d16c653bd35d29472212 @josevalim josevalim committed Jul 11, 2011
@@ -70,8 +70,13 @@ def asset_environment(app)
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 @@
# 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

0 comments on commit 33f76e1

Please sign in to comment.