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
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,8 @@
"description": "Specifies the visibility of the Command Explorer in the PowerShell Side Bar."
},
"powershell.sideBar.CommandExplorerExcludeFilter": {
"type":"array",
"default":[],
"type": "array",
"default": [],
"description": "Specify array of Modules to exclude from Command Explorer listing."
},
"powershell.powerShellExePath": {
Expand Down
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 @@ -76,6 +76,7 @@ task Clean {
Write-Host "`n### Cleaning vscode-powershell`n" -ForegroundColor Green
Remove-Item .\modules\* -Exclude "README.md" -Recurse -Force -ErrorAction Ignore
Remove-Item .\out -Recurse -Force -ErrorAction Ignore
exec { & npm prune }
}

task CleanEditorServices {
Expand Down