From e5d29b60cf86f9b4811e5d13da81d0573595ed50 Mon Sep 17 00:00:00 2001 From: Sojan Date: Thu, 27 Apr 2023 17:06:13 +0530 Subject: [PATCH] chore: test --- lib/tasks/yarn.rake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/tasks/yarn.rake b/lib/tasks/yarn.rake index fd9970dc8..791807391 100644 --- a/lib/tasks/yarn.rake +++ b/lib/tasks/yarn.rake @@ -1,3 +1,10 @@ # ref: https://github.com/rails/rails/issues/43906#issuecomment-1094380699 # https://github.com/rails/rails/issues/43906#issuecomment-1099992310 -Rake::Task['assets:precompile'].enhance ['yarn'] +task before_assets_precompile: :environment do + # run a command which starts your packaging + system('yarn') +end + +# every time you execute 'rake assets:precompile' +# run 'before_assets_precompile' first +Rake::Task['assets:precompile'].enhance ['before_assets_precompile']