mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 03:25:31 -05:00
Check if Uglifier
is defined (we're precompiling assets)
This commit is contained in:
parent
8a6f9425d4
commit
42d9dedad1
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
if defined?(Uglifier)
|
||||||
config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024})
|
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
|
||||||
|
|
Loading…
Reference in a new issue