FIX: In development mode on OSX, plugin stylesheets were not reloading

It seems to be due to symlinks in the plugins folder. Watching
the individual plugins seems to fix the issue rather than the entire
plugin folder.
This commit is contained in:
Robin Ward 2017-08-09 11:06:27 -04:00
parent 7a4aee4a7e
commit 7b3631454d

View File

@ -10,10 +10,20 @@ module Stylesheet
end
def initialize(paths)
@paths = paths || ["app/assets/stylesheets", "plugins"]
@paths = paths || Watcher.default_paths
@queue = Queue.new
end
def self.default_paths
return @default_paths if @default_paths
@default_paths = ["app/assets/stylesheets"]
Discourse.plugins.each do |p|
@default_paths << File.dirname(p.path).sub(Rails.root.to_s, '').sub(/^\//, '')
end
@default_paths
end
def start
Thread.new do