Skip to content

Update build to clear node modules directory #1741

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

Merged
merged 3 commits into from
Feb 8, 2019
Merged
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
5 changes: 3 additions & 2 deletions vscode-powershell.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ task ResolveEditorServicesPath -Before CleanEditorServices, BuildEditorServices,
}
}

task Restore RestoreNodeModules -Before Build
task Restore RestoreNodeModules -Before Build -If { -not (Test-Path "$PSScriptRoot/node_modules") }

task RestoreNodeModules -If { -not (Test-Path "$PSScriptRoot/node_modules") } {
task RestoreNodeModules {

Write-Host "`n### Restoring vscode-powershell dependencies`n" -ForegroundColor Green

Expand All @@ -75,6 +75,7 @@ task RestoreNodeModules -If { -not (Test-Path "$PSScriptRoot/node_modules") } {
task Clean {
Write-Host "`n### Cleaning vscode-powershell`n" -ForegroundColor Green
Remove-Item .\modules\* -Exclude "README.md" -Recurse -Force -ErrorAction Ignore
Remove-Item .\node_modules -Recurse -Force -ErrorAction Ignore
Remove-Item .\out -Recurse -Force -ErrorAction Ignore
}

Expand Down