mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
Allow importing Discourse styles in custom stylesheets to modify vars.
This commit is contained in:
@ -35,10 +35,10 @@ task 'assets:precompile:before' do
|
||||
def evaluate(context, locals, &block)
|
||||
::Sprockets.cache_compiled("sass", data) do
|
||||
# HACK, SASS compiler will degrade to aweful perf with huge files
|
||||
# Bypass if larger than 200kb, ensure assets are minified prior
|
||||
# Bypass if larger than 500kb, ensure assets are minified prior
|
||||
if context.pathname &&
|
||||
context.pathname.to_s =~ /.css$/ &&
|
||||
data.length > 200.kilobytes
|
||||
data.length > 500.kilobytes
|
||||
puts "Skipped minifying #{context.pathname} cause it is larger than 200KB, minify in source control or avoid large CSS files"
|
||||
data
|
||||
else
|
||||
|
Reference in New Issue
Block a user