|
8 | 8 | Projects: |
9 | 9 | vscode-extension – VS Code extension (TypeScript / Node.js) |
10 | 10 | cli – Command-line tool (TypeScript / Node.js) |
| 11 | + sharing – Self-hosted sharing server (TypeScript / Node.js) |
11 | 12 | visualstudio-extension – Visual Studio extension (C# / .NET) [future] |
12 | 13 |
|
13 | 14 | .PARAMETER Project |
14 | | - Which project(s) to build. Accepts: all | vscode | cli | visualstudio |
| 15 | + Which project(s) to build. Accepts: all | vscode | cli | sharing | visualstudio |
15 | 16 | Default: all |
16 | 17 |
|
17 | 18 | .PARAMETER Target |
|
28 | 29 | #> |
29 | 30 |
|
30 | 31 | param( |
31 | | - [ValidateSet('all', 'vscode', 'cli', 'visualstudio')] |
| 32 | + [ValidateSet('all', 'vscode', 'cli', 'visualstudio', 'sharing')] |
32 | 33 | [string] $Project = 'all', |
33 | 34 |
|
34 | 35 | [ValidateSet('build', 'package', 'test', 'clean')] |
@@ -195,16 +196,34 @@ function Build-VisualStudio { |
195 | 196 | } |
196 | 197 |
|
197 | 198 | # --------------------------------------------------------------------------- |
198 | | -# Entry point |
| 199 | +# Sharing Server |
199 | 200 | # --------------------------------------------------------------------------- |
| 201 | +function Build-Sharing { |
| 202 | + Write-Step "sharing-server: $Target" |
| 203 | + Push-Location "$PSScriptRoot/sharing-server" |
| 204 | + try { |
| 205 | + switch ($Target) { |
| 206 | + 'build' { npm ci; npm run build } |
| 207 | + 'package' { npm ci; npm run build:production } |
| 208 | + 'test' { Write-Host " (no sharing-server tests yet)" } |
| 209 | + 'clean' { Remove-Item -Recurse -Force dist -ErrorAction SilentlyContinue } |
| 210 | + } |
| 211 | + Write-Ok "sharing-server done." |
| 212 | + } |
| 213 | + finally { Pop-Location } |
| 214 | +} |
| 215 | + |
| 216 | + |
200 | 217 | switch ($Project) { |
201 | 218 | 'all' { |
202 | 219 | Build-VsCode |
203 | 220 | Build-Cli |
| 221 | + Build-Sharing |
204 | 222 | Build-VisualStudio |
205 | 223 | } |
206 | 224 | 'vscode' { Build-VsCode } |
207 | 225 | 'cli' { Build-Cli } |
| 226 | + 'sharing' { Build-Sharing } |
208 | 227 | 'visualstudio'{ Build-VisualStudio } |
209 | 228 | } |
210 | 229 |
|
|
0 commit comments