Skip to content

Commit

Permalink
fix: ensure that frontend assets are installed before (pre)compiling (#…
Browse files Browse the repository at this point in the history
…460)

This was removed in Shakapacker v7 though our CI doesn't fail because
we're already installing it before every command - but that does not
happen for deployments.
  • Loading branch information
G-Rath authored Aug 11, 2023
1 parent 8d0acff commit d08927d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions variants/backend-base/lib/tasks/assets.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace :assets do
desc "Ensures that dependencies required to compile assets are installed"
task install_dependencies: :environment do
raise if File.exist?("yarn.lock") && !(system "yarn install --frozen-lockfile")
end
end

Rake::Task["assets:precompile"].enhance ["assets:install_dependencies"]

0 comments on commit d08927d

Please sign in to comment.