lib/tasks/vite.rake in vite_ruby-3.1.4 vs lib/tasks/vite.rake in vite_ruby-3.1.5
- old
+ new
@@ -40,10 +40,11 @@
ViteRuby.commands.verify_install
end
desc 'Ensure build dependencies like Vite are installed before bundling'
task :install_dependencies do
- system({ 'NODE_ENV' => 'development' }, 'npx ci --yes')
+ cmd = `npm --version`.to_i < 7 ? 'npx ci --yes' : 'npx --yes ci'
+ system({ 'NODE_ENV' => 'development' }, cmd)
end
desc "Provide information on ViteRuby's environment"
task :info do
ViteRuby.commands.print_info