From e333322623cdc8ebbe953222cd7e064fe6b49e23 Mon Sep 17 00:00:00 2001 From: Robin Mehner Date: Tue, 20 Jun 2023 20:25:22 +0200 Subject: [PATCH] Enhance spec:prepare command with tailwindcss:build command jsbundling-rails (https://github.com/rails/jsbundling-rails/pull/128) and cssbundling-rails (https://github.com/rails/cssbundling-rails/pull/116) do the same and it's useful for people who are using RSpec. --- lib/tasks/build.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/build.rake b/lib/tasks/build.rake index 1340769..8f61bf8 100644 --- a/lib/tasks/build.rake +++ b/lib/tasks/build.rake @@ -22,6 +22,8 @@ Rake::Task["assets:precompile"].enhance(["tailwindcss:build"]) if Rake::Task.task_defined?("test:prepare") Rake::Task["test:prepare"].enhance(["tailwindcss:build"]) +elsif Rake::Task.task_defined?("spec:prepare") + Rake::Task["spec:prepare"].enhance(["tailwindcss:build"]) elsif Rake::Task.task_defined?("db:test:prepare") Rake::Task["db:test:prepare"].enhance(["tailwindcss:build"]) end