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(installer): Add bun as a JS package manager/runtime (windows) #4473

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

TheBearodactyl
Copy link
Contributor

Description

Adds bun as a js package manager/runtime in the installer script for windows

How Has This Been Tested?

Just like with the linux installer script, i've run it on my machine, both with and without bun installed.

@TheBearodactyl TheBearodactyl changed the title feat(installer): Add bun as a JS package manager/runtime (this time for windows) feat(installer): Add bun as a JS package manager/runtime (windows) Jan 20, 2024
Copy link
Collaborator

@kylo252 kylo252 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can simplify all of this by detecting if bun is available and use it in install_nodejs_deps() similar to how we do it in the bash installer.

I think it would look something like this

function install_nodejs_deps() {
    try {
        if (Get-Command "bun" -ErrorAction SilentlyContinue) { 
            Set-Alias pkg_manager "bun" -Scope Private
        } else {
            Set-Alias pkg_manager "npm" -Scope Private
            check_system_dep "node"
        }
        Invoke-Command -ScriptBlock { pkg_manager install --global neovim tree-sitter-cli } -ErrorAction Break
    } catch {
        print_missing_dep_msg "$dep"
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants