From eed53430d80e0faf4b3ba5c7add683a3904f5e77 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Mon, 29 Apr 2024 23:08:38 +0200 Subject: [PATCH] Add config.tailwindcss.server_process option --- lib/tailwindcss/engine.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tailwindcss/engine.rb b/lib/tailwindcss/engine.rb index 96fb1a7..99e0c82 100644 --- a/lib/tailwindcss/engine.rb +++ b/lib/tailwindcss/engine.rb @@ -2,6 +2,9 @@ module Tailwindcss class Engine < ::Rails::Engine + config.tailwindcss = ActiveSupport::OrderedOptions.new + config.tailwindcss.server_process = Rails.env.development? + initializer "tailwindcss.assets" do Rails.application.config.assets.precompile += %w( inter-font.css ) end @@ -15,7 +18,7 @@ class Engine < ::Rails::Engine end server do - ServerProcess.start + ServerProcess.start if config.tailwindcss.server_process end end end