Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Include jsbundling setup step for extensions (#11502)

Damian Legawiec6a0dbf1041c4
diff --git a/core/lib/spree/testing_support/common_rake.rb b/core/lib/spree/testing_support/common_rake.rb
index 1196a6349c..d6c03f25bf 100644
--- a/core/lib/spree/testing_support/common_rake.rb
+++ b/core/lib/spree/testing_support/common_rake.rb
@@ -40,6 +40,11 @@ namespace :common do
Spree::DummyModelGenerator.start
system('bundle exec rake db:migrate')
+ unless ['spree/api', 'spree/core', 'spree/sample', 'spree/emails'].include?(ENV['LIB_NAME'])
+ puts 'Setting up node environment'
+ system('bin/rails javascript:install:esbuild')
+ end
+
begin
require "generators/#{ENV['LIB_NAME']}/install/install_generator"
puts 'Running extension installation generator...'
@@ -51,7 +56,6 @@ namespace :common do
unless ['spree/api', 'spree/core', 'spree/sample'].include?(ENV['LIB_NAME'])
if ENV['LIB_NAME'] == 'spree/backend'
puts 'Installing node dependencies...'
- system('bin/rails javascript:install:esbuild')
system('yarn link @spree/dashboard')
system('yarn install')
end