mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 12:11:16 -05:00
Merge pull request #2974 from longhotsummer/patch-1
Traverse symlinks to plugins in dev mode when compiling stylesheets
This commit is contained in:
commit
6d0b6b0642
1 changed files with 11 additions and 4 deletions
|
@ -56,10 +56,17 @@ class DiscourseStylesheets
|
|||
end
|
||||
|
||||
def self.max_file_mtime
|
||||
[ "#{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
|
||||
globs = ["#{Rails.root}/app/assets/stylesheets/**/*.*css"]
|
||||
|
||||
for path in (Discourse.plugins || []).map { |plugin| File.dirname(plugin.path) }
|
||||
globs += [
|
||||
"#{path}/plugin.rb",
|
||||
"#{path}/**/*.*css",
|
||||
]
|
||||
end
|
||||
|
||||
globs.map do |pattern|
|
||||
Dir.glob(pattern).map { |x| File.mtime(x) }.max
|
||||
end.compact.max.to_i
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue