also watch CSS in unicorn on dev
This commit is contained in:
parent
7c0e6b820e
commit
800760e353
|
@ -52,7 +52,7 @@ Discourse::Application.configure do
|
|||
config.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.watch
|
||||
|
|
|
@ -68,9 +68,12 @@ module Stylesheet
|
|||
Stylesheet::Manager.cache.clear
|
||||
|
||||
message = ["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', message
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue