diff --git a/lib/stylesheet/watcher.rb b/lib/stylesheet/watcher.rb index e7c9a5ab9b1..27dbe8f692b 100644 --- a/lib/stylesheet/watcher.rb +++ b/lib/stylesheet/watcher.rb @@ -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