Skip to content

Commit

Permalink
Engine server hook
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno- authored and flavorjones committed Apr 27, 2024
1 parent 185fc35 commit f77a0ce
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 f77a0ce

Please sign in to comment.