Skip to content

Commit

Permalink
Engine server hook
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno- committed Apr 18, 2024
1 parent fe5a6f7 commit 751a511
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/tailwindcss/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,14 @@ class Engine < ::Rails::Engine
config.app_generators do |g|
g.template_engine :tailwindcss
end

server do
tailwind_pid = fork do
exec(*Tailwindcss::Commands.watch_command(always: true))
end
at_exit do
Process.kill(:INT, tailwind_pid)
end
end
end
end

0 comments on commit 751a511

Please sign in to comment.