forked from ironmansoftware/universal-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vscode.build.ps1
29 lines (23 loc) · 1.13 KB
/
vscode.build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
task BuildExtension {
& {
$ErrorActionPreference = 'SilentlyContinue'
npm install -g npm
npm install -g typescript@latest
npm install -g vsce
npm install
$HttpClient = Get-Content "$PSScriptRoot\node_modules\@microsoft\signalr\dist\esm\HttpClient.d.ts" -Raw
"// @ts-nocheck`r`n$HttpClient" | Out-File "$PSScriptRoot\node_modules\@microsoft\signalr\dist\esm\HttpClient.d.ts" -Force
Remove-Item (Join-Path $PSScriptRoot "out") -Force -Recurse -ErrorAction SilentlyContinue
New-Item (Join-Path $PSScriptRoot "out") -ItemType Directory
Remove-Item (Join-Path $PSScriptRoot "kit") -Force -Recurse -ErrorAction SilentlyContinue
New-Item (Join-Path $PSScriptRoot "kit") -ItemType Directory
Copy-Item "$PSScriptRoot\src\Universal.VSCode.psm1" "$PSScriptRoot\out"
vsce package
Copy-Item (Join-Path $PSScriptRoot "*.vsix") (Join-Path $PSScriptRoot "kit")
}
}
task PublishExtension {
$vsix = (Get-ChildItem "$PSScriptRoot\*.vsix").FullName
vsce publish --packagePath $vsix -p $env:MarketplaceToken
}
task . BuildExtension