small changes

This commit is contained in:
pvincent
2024-09-16 10:42:47 +04:00
parent 53807b03c1
commit efc4ae7a07
3 changed files with 3 additions and 6 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
return unless defined?(RailsLiveReload) && Rails.env.development? return unless defined?(RailsLiveReload)
# RailsLiveReload
RailsLiveReload.configure do |config| RailsLiveReload.configure do |config|
# Tailwind CSS # Tailwind CSS
# First rule prevents reloading from asset files ending with '.tailwind.css' # First rule prevents reloading from asset files ending with '.tailwind.css'
+1 -1
View File
@@ -16,6 +16,6 @@ Rails.configuration.after_initialize do
end end
ActiveSupport::Notifications.subscribe('rolling.live_constant') do |event| ActiveSupport::Notifications.subscribe('rolling.live_constant') do |event|
SemanticLogger[:live_notifications].warn('new event', event.payload) # FIXME: to be continued... SemanticLogger[:live_notifications].warn('rolling.live_constant', event.payload) # FIXME: to be continued...
end end
end end
+1 -3
View File
@@ -44,9 +44,7 @@ module Live
# changes << {kind: :restored, constant: 'ACTION_VIEW', type :boolean, old_value: false, new_value:false} # changes << {kind: :restored, constant: 'ACTION_VIEW', type :boolean, old_value: false, new_value:false}
# ActiveSupport::Notifications.instrument 'rolling.live_constant', this: changes # ActiveSupport::Notifications.instrument 'rolling.live_constant', this: changes
return unless RailsLiveReload.watcher FileUtils.touch(MAIN_CSS) if defined?(RailsLiveReload) # triggering RailsLiveReload
FileUtils.touch(MAIN_CSS) # triggering RailsLiveReload
end end
private private