mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
DEV: ENV variable for brotli quality in assets:precompile rake task (#26286)
Why this change? This ENV allows the brotli compression quality to be configurable such that one can opt for a higher/lower level of compression based on their preferences.
This commit is contained in:
parent
2d867aa8e5
commit
0aa92500aa
@ -196,7 +196,8 @@ end
|
||||
|
||||
# different brotli versions use different parameters
|
||||
def brotli_command(path, max_compress)
|
||||
compression_quality = max_compress ? "11" : "6"
|
||||
compression_quality =
|
||||
max_compress ? "11" : (ENV["DISCOURSE_ASSETS_PRECOMPILE_DEFAULT_BROTLI_QUALITY"] || "6")
|
||||
"brotli -f --quality=#{compression_quality} #{path} --output=#{path}.br"
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user