mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: detect css changes in plugins that use register_css
This commit is contained in:
parent
69abe470c5
commit
15e91f2da9
1 changed files with 5 additions and 2 deletions
|
@ -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 a new issue