From a7dfb2abdda517ae9bb731b5278c4d21c8b0a2bd Mon Sep 17 00:00:00 2001 From: CorBob Date: Thu, 31 Jan 2019 21:49:55 -0800 Subject: [PATCH 1/3] Update build to clear node modules Add removal of the node_modules directory on Clean task. Move condition for restore to the build prerequisite. This allows the restoring of node modules even if the folder exists. --- vscode-powershell.build.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index 47c3ecab66..bc5683ffc4 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -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 @@ -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 } From 3f9b77cc3ccee87af4c866b571c11fa6568e9369 Mon Sep 17 00:00:00 2001 From: CorBob Date: Fri, 1 Feb 2019 22:45:25 -0800 Subject: [PATCH 2/3] Don't remove node_modules. This causes bad things to happen when you're editing in vscode (@types is locked until code exits) Next best thing might be to npm prune (or maybe npm install?) --- vscode-powershell.build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index bc5683ffc4..6c4635e0f1 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -75,8 +75,8 @@ task RestoreNodeModules { 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 + exec { & npm prune } } task CleanEditorServices { From 679d971db40b4816bee7936141050a13a3cee30f Mon Sep 17 00:00:00 2001 From: CorBob Date: Fri, 1 Feb 2019 22:45:45 -0800 Subject: [PATCH 3/3] npm install keeps putting these spaces in... --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 228eb9c451..edb46a0725 100644 --- a/package.json +++ b/package.json @@ -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": {