Skip to content

Instantly share code, notes, and snippets.

@bcanzanella
Created November 2, 2020 16:25
Show Gist options
  • Save bcanzanella/181487dab87f348ab3ff8d8dba21297c to your computer and use it in GitHub Desktop.
Save bcanzanella/181487dab87f348ab3ff8d8dba21297c to your computer and use it in GitHub Desktop.
windows rebuild
[CmdletBinding(PositionalBinding = $false)]
Param(
[Parameter(Mandatory = $true)]
[Alias("p")]
[System.String] $Path
)
cd $Path
cd shared/ui
if ((Test-Path "node_modules") -eq $true) {
Write-Host "Removing shared/ui/node_modules..."
Remove-Item -LiteralPath "node_modules" -Force -Recurse
}
Write-Host "Installing ui..."
npm install --no-save
cd ../agent
if ((Test-Path "node_modules") -eq $true) {
Write-Host "Removing shared/agent/node_modules..."
Remove-Item -LiteralPath "node_modules" -Force -Recurse
}
Write-Host "Installing agent..."
npm install --no-save
Write-Host "Building agent..."
npm run build
cd ../../vscode
if ((Test-Path "node_modules") -eq $true) {
Write-Host "Removing vscode/node_modules..."
Remove-Item -LiteralPath "node_modules" -Force -Recurse
}
Write-Host "Installing vscode"
npm install --no-save
Write-Host "Building agent..."
npm run build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment