Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add package_manager config option, experimental support for bun #481

Merged
merged 5 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: fix bin/vite upgrade after the internal refactoring
  • Loading branch information
ElMassimo committed Jul 17, 2024
commit efb510f18317d4958bc4d4152f1a78b046375e89
4 changes: 2 additions & 2 deletions vite_ruby/lib/vite_ruby/cli/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def install_js_dependencies
FileUtils.mv root.join('vite.config.ts'), root.join('vite.config.mts'), force: true, verbose: true
end

install_dependencies js_dependencies.join(' ')
install_js_packages js_dependencies.join(' ')
end

# Internal: Adds compilation output dirs to git ignore.
Expand Down Expand Up @@ -131,7 +131,7 @@ def run_with_capture(*args, **options)
end
end

def install_dependencies(deps)
def install_js_packages(deps)
run_with_capture("#{ config.package_manager } add -D #{ deps }", stdin_data: "\n")
end

Expand Down
3 changes: 1 addition & 2 deletions vite_ruby/lib/vite_ruby/cli/upgrade_packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class ViteRuby::CLI::UpgradePackages < ViteRuby::CLI::Install

def call(**)
say 'Upgrading npm packages'
deps = js_dependencies.join(' ')
run_with_capture("#{ npm_install } -D #{ deps }")
install_js_packages js_dependencies.join(' ')
end
end