Skip to content

Commit

Permalink
⚡ perf: install bun query
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquindev committed Jan 2, 2025
1 parent 8308ef7 commit b01ede3
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions Setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,16 @@ if (Get-Command git -ErrorAction SilentlyContinue) {
git config --global user.email $gitUserMail >$null 2>&1
}

# install nodejs
if ((Get-Command nvm -ErrorAction SilentlyContinue) -and (!(Get-Command node -ErrorAction SilentlyContinue))) {
nvm install lts >$null 2>&1
nvm use newest
# install nodejs & bun
if ((Get-Command nvm -ErrorAction SilentlyContinue)) {
if (!(Get-Command node -ErrorAction SilentlyContinue)) {
nvm install lts >$null 2>&1
nvm use lts
}
if (!(Get-Command bun -ErrorAction SilentlyContinue)) {
$useBun = $(Write-Host "Install 'bun'? (Y/n): " -ForegroundColor Magenta -NoNewline; Read-Host)
if ($useBun.ToUpper() -eq 'Y') { npm install -g bun }
}
}

# reload bat configuration
Expand Down Expand Up @@ -252,12 +258,12 @@ if (Get-Command code -ErrorAction SilentlyContinue) {
}

# wsl enable
# if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "Microsoft-Windows-Subsystem-Linux" }).State -eq "Disabled") {
# Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -All -NoRestart
# }
# if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "VirtualMachinePlatform" }).State -eq "Disabled") {
# Enable-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform" -All -NoRestart
# }
if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "Microsoft-Windows-Subsystem-Linux" }).State -eq "Disabled") {
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -All -NoRestart
}
if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -eq "VirtualMachinePlatform" }).State -eq "Disabled") {
Enable-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform" -All -NoRestart
}

# start komorebi
if (Get-Command komorebic -ErrorAction SilentlyContinue) {
Expand Down

0 comments on commit b01ede3

Please sign in to comment.