lib/tasks/maglev_tasks.rake in maglevcms-1.1.3 vs lib/tasks/maglev_tasks.rake in maglevcms-1.1.4
- old
+ new
@@ -57,54 +57,54 @@
namespace :vite do
desc 'Bundle frontend entrypoints using ViteRuby'
task build: :'vite:verify_install' do
within_engine_folder do
- ViteRuby.commands.build_from_task
+ Maglev::Engine.vite_ruby.commands.build_from_task
end
end
desc 'Bundle entrypoints using Vite Ruby (SSR only if enabled)'
task build_all: :'vite:verify_install' do
within_engine_folder do
- ViteRuby.commands.build_from_task
- ViteRuby.commands.build_from_task('--ssr') if ViteRuby.config.ssr_build_enabled
+ Maglev::Engine.vite_ruby.commands.build_from_task
+ Maglev::Engine.vite_ruby.commands.build_from_task('--ssr') if ViteRuby.config.ssr_build_enabled
end
end
desc 'Ensure build dependencies like Vite are installed before bundling'
task install_dependencies: :environment do
within_engine_folder do
- cmd = ViteRuby.commands.legacy_npm_version? ? 'npx ci --yes' : 'npx --yes ci'
+ cmd = Maglev::Engine.vite_ruby.commands.legacy_npm_version? ? 'npx ci --yes' : 'npx --yes ci'
system({ 'NODE_ENV' => 'development' }, cmd)
end
end
desc 'Verify if ViteRuby is properly installed in the app'
task verify_install: :environment do
within_engine_folder do
- ViteRuby.commands.verify_install
+ Maglev::Engine.vite_ruby.commands.verify_install
end
end
desc 'Remove old bundles created by ViteRuby'
task :clean, %i[keep age] => :'vite:verify_install' do |_, args|
within_engine_folder do
- ViteRuby.commands.clean_from_task(args)
+ Maglev::Engine.vite_ruby.commands.clean_from_task(args)
end
end
desc 'Remove the build output directory for ViteRuby'
task clobber: :'vite:verify_install' do
within_engine_folder do
- ViteRuby.commands.clobber
+ Maglev::Engine.vite_ruby.commands.clobber
end
end
desc "Provide information on ViteRuby's environment"
task info: :environment do
within_engine_folder do
- ViteRuby.commands.print_info
+ Maglev::Engine.vite_ruby.commands.print_info
end
end
end
end