A platform for community discussion. Free, open, simple.
also watch CSS in unicorn on dev
Sam800760e353b1
diff --git a/config/environments/development.rb b/config/environments/development.rbindex d9c10db2e8a..94a96f10848 100644--- a/config/environments/development.rb+++ b/config/environments/development.rb@@ -52,7 +52,7 @@ Discourse::Application.configure doconfig.developer_emails = emails.split(",").map(&:downcase).map(&:strip)end- if defined?(Rails::Server) || defined?(Puma)+ if defined?(Rails::Server) || defined?(Puma) || defined?(Unicorn)require 'stylesheet/watcher'STDERR.puts "Starting CSS change watcher"@watcher = Stylesheet::Watcher.watchdiff --git a/lib/stylesheet/watcher.rb b/lib/stylesheet/watcher.rbindex f0778b38dc2..952118ba454 100644--- a/lib/stylesheet/watcher.rb+++ b/lib/stylesheet/watcher.rb@@ -68,9 +68,12 @@ module StylesheetStylesheet::Manager.cache.clearmessage = ["desktop", "mobile", "admin"].map do |name|- { target: name, new_href: Stylesheet::Manager.stylesheet_href(name.to_sym) , theme_key: SiteSetting.default_theme_key }+ {+ target: name,+ new_href: Stylesheet::Manager.stylesheet_href(name.to_sym),+ theme_key: SiteSetting.default_theme_key+ }end-MessageBus.publish '/file-change', messageend