Check if Uglifier is defined (we're precompiling assets)

This commit is contained in:
Robin Ward 2014-10-15 16:08:00 -04:00
parent 8a6f9425d4
commit 42d9dedad1

View file

@ -12,7 +12,12 @@ Discourse::Application.configure do
# Disable Rails's static asset server (Apache or nginx will already do this) # Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = GlobalSetting.serve_static_assets config.serve_static_assets = GlobalSetting.serve_static_assets
config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024}) if defined?(Uglifier)
config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024})
else
config.assets.js_compressor = :uglifier
end
config.assets.css_compressor = :sass config.assets.css_compressor = :sass
# stuff should be pre-compiled # stuff should be pre-compiled