FIX: detect css changes in plugins that use register_css
This commit is contained in:
parent
69abe470c5
commit
15e91f2da9
|
@ -42,8 +42,11 @@ class DiscourseStylesheets
|
|||
end
|
||||
|
||||
def self.max_file_mtime
|
||||
[ Dir.glob("#{Rails.root}/app/assets/stylesheets/**/*.*css").map {|x| File.mtime(x) }.max,
|
||||
Dir.glob("#{Rails.root}/plugins/**/assets/stylesheets/**/*.*css").map {|x| File.mtime(x) }.max ].compact.max.to_i
|
||||
[ "#{Rails.root}/app/assets/stylesheets/**/*.*css",
|
||||
"#{Rails.root}/plugins/**/*.*css",
|
||||
"#{Rails.root}/plugins/**/plugin.rb" ].map do |pattern|
|
||||
Dir.glob(pattern).map { |x| File.mtime(x) }.max
|
||||
end.compact.max.to_i
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue