Skip to content
Closed
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This extension uses git submodules to pull in the Solution Parser and the Avalon

`git submodule update --init --recursive`

3. Run the `build.sh`, currently repo does not have build script for Windows
3. Run the `build.sh` or `build.ps1`

## How to contribute

Expand All @@ -44,7 +44,7 @@ Hit `F5` this will a new vscode window with the dev extension running. Open an a

## Package Extension

Make sure you run the `build.sh` before packaging and you have `vsce` installed. If you do not, run the following command:
Make sure you run the `build.sh` or `build.ps1` before packaging and you have `vsce` installed. If you do not, run the following command:

```bash
npm install -g @vscode/vsce
Expand Down
44 changes: 44 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
$root = Get-Location;
$vscode_avalonia = "$(Get-Location)\src\vscode-avalonia"
$avalonia_lsp = "$(Get-Location)\src\AvaloniaLSP\AvaloniaLanguageServer\AvaloniaLanguageServer.csproj"
$avalonia_sp = "$(Get-Location)\src\SolutionParser\SolutionParser.csproj"

# yarn install
try {
npm install --global yarn tsc typescript @vscode/vsce
}
catch {
Write-Host "Error: `"npm install --global yarn tsc typescript @vscode/vsce`""
break;
}

try {
Set-Location "$vscode_avalonia"
yarn config set "strict-ssl" false
yarn install
Set-Location "$root"
}
catch {
Write-Host "Error: `"yarn install`""
break;
}

# Build Avalonia LSP
try {
dotnet build "$avalonia_lsp" /property:GenerateFullPaths=true --output "$vscode_avalonia\avaloniaServer"
}
catch {
Write-Host "Error: `"dotnet build `"$avalonia_lsp`" /property:GenerateFullPaths=true --output `"$vscode_avalonia\avaloniaServer`"`""
break;
}

# Build Solution parser
try {
dotnet build "$avalonia_sp" /property:GenerateFullPaths=true --output "$vscode_avalonia\solutionParserTool"
}
catch {
Write-Host "Error: `"dotnet build `"$avalonia_sp`" /property:GenerateFullPaths=true --output `"$vscode_avalonia\solutionParserTool`""
break;
}

Write-Host "Successful"