Skip to content

Commit 7acca5c

Browse files
Refactor VSCode tasks and launch configurations for improved build and test processes
1 parent 74c63fc commit 7acca5c

File tree

2 files changed

+59
-31
lines changed

2 files changed

+59
-31
lines changed

.vscode/launch.json

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"request": "launch",
77
"name": "PowerShell Launch Current File",
88
"script": "${file}",
9-
"args": [],
9+
"args": [ ],
1010
"cwd": "${file}"
1111
},
1212
{
1313
"type": "PowerShell",
1414
"request": "launch",
1515
"name": "PowerShell Launch Current File in Temporary Console",
1616
"script": "${file}",
17-
"args": [],
17+
"args": [ ],
1818
"cwd": "${file}",
1919
"createTemporaryIntegratedConsole": true
2020
},
@@ -23,30 +23,8 @@
2323
"request": "launch",
2424
"name": "PowerShell Launch Current File w/Args Prompt",
2525
"script": "${file}",
26-
"args": ["${command:SpecifyScriptArgs}"],
26+
"args": [ "${command:SpecifyScriptArgs}" ],
2727
"cwd": "${file}"
28-
},
29-
{
30-
"type": "PowerShell",
31-
"request": "launch",
32-
"name": "PowerShell Launch DebugTest.ps1",
33-
"script": "${workspaceRoot}/DebugTest.ps1",
34-
"args": ["-Count 55 -DelayMilliseconds 250"],
35-
"cwd": "${workspaceRoot}"
36-
},
37-
{
38-
"type": "PowerShell",
39-
"request": "launch",
40-
"name": "PowerShell Interactive Session",
41-
"cwd": "${workspaceRoot}"
42-
},
43-
{
44-
"type": "PowerShell",
45-
"request": "launch",
46-
"name": "PowerShell Pester Tests",
47-
"script": "Invoke-Pester",
48-
"args": [],
49-
"cwd": "${workspaceRoot}"
5028
}
5129
]
5230
}

.vscode/tasks.json

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,74 @@
4141
{
4242
"label": "Bootstrap",
4343
"type": "shell",
44-
"command": "Import-Module '${workspaceFolder}/build.psm1'; Start-PSBootstrap",
45-
"problemMatcher": []
44+
"command": "if (-not (Get-Module -ListAvailable -Name PSDepend)) { Install-Module -Name PSDepend -Scope CurrentUser -Force }; Invoke-PSDepend -Path '${workspaceFolder}/requirements.psd1' -Install -Import -Force",
45+
"problemMatcher": [ ]
4646
},
4747
{
4848
"label": "Clean Build",
4949
"type": "shell",
50-
"command": "Import-Module '${workspaceFolder}/build.psm1'; Start-PSBuild -Clean -Output (Join-Path '${workspaceFolder}' debug)",
51-
"problemMatcher": "$msCompile"
50+
"command": "Invoke-Build Clean,Build",
51+
"group": {
52+
"kind": "build"
53+
},
54+
"problemMatcher": [ ]
5255
},
5356
{
5457
"label": "Build",
5558
"type": "shell",
56-
"command": "Import-Module '${workspaceFolder}/build.psm1'; Start-PSBuild -Output (Join-Path '${workspaceFolder}' debug)",
59+
"command": "Invoke-Build Build",
5760
"group": {
5861
"kind": "build",
5962
"isDefault": true
6063
},
61-
"problemMatcher": "$msCompile"
64+
"problemMatcher": [ ]
65+
},
66+
{
67+
"label": "Test",
68+
"type": "shell",
69+
"command": "Invoke-Build Test",
70+
"group": "test",
71+
"problemMatcher": [ ]
72+
},
73+
{
74+
"label": "UnitTests",
75+
"type": "shell",
76+
"command": "Invoke-Build UnitTests",
77+
"group": "test",
78+
"problemMatcher": [ ]
79+
},
80+
{
81+
"label": "IntegrationTests",
82+
"type": "shell",
83+
"command": "Invoke-Build IntegrationTests",
84+
"group": "test",
85+
"problemMatcher": [ ]
86+
},
87+
{
88+
"label": "PSScriptAnalyzer",
89+
"type": "shell",
90+
"command": "Invoke-Build PSScriptAnalyzer",
91+
"group": "test",
92+
"problemMatcher": [ ]
93+
},
94+
{
95+
"label": "InjectionHunter",
96+
"type": "shell",
97+
"command": "Invoke-Build InjectionHunter",
98+
"group": "test",
99+
"problemMatcher": [ ]
100+
},
101+
{
102+
"label": "Export-CommandHelp",
103+
"type": "shell",
104+
"command": "Invoke-Build Export-CommandHelp",
105+
"problemMatcher": [ ]
106+
},
107+
{
108+
"label": "Clean",
109+
"type": "shell",
110+
"command": "Invoke-Build Clean",
111+
"problemMatcher": [ ]
62112
}
63113
]
64114
}

0 commit comments

Comments
 (0)