lib/vite_ruby/commands.rb in vite_ruby-3.1.6 vs lib/vite_ruby/commands.rb in vite_ruby-3.1.7
- old
+ new
@@ -64,9 +64,14 @@
def install_binstubs
`bundle binstub vite_ruby --path #{ config.root.join('bin') }`
`bundle config --delete bin`
end
+ # Internal: Checks if the npm version is 6 or lower.
+ def legacy_npm_version?
+ `npm --version`.to_i < 7 rescue false
+ end
+
# Internal: Verifies if ViteRuby is properly installed.
def verify_install
unless File.exist?(config.root.join('bin/vite'))
warn <<~WARN