Skip to content

Commit

Permalink
Clean up packaging the VS Code vsix
Browse files Browse the repository at this point in the history
Fix image URLs and add new commands:

* npm run vsix-pack
* npm run vsix-install
  • Loading branch information
mhutch committed Sep 26, 2024
1 parent 271922b commit d1912ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Pack VSCode Extension
working-directory: msbuild-editor-vscode
run: npx vsce package --no-git-tag-version --pre-release ${{ steps.nbgv.outputs.NpmPackageVersion }}
run: npm run vsix-pack

- uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows')
Expand Down
2 changes: 1 addition & 1 deletion msbuild-editor-vscode/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ src/**
# are correct when the README.md is viewed in the repo. however, they
# are not needed in the vsix as README.md in the generated package
# has the paths rewritten to https URLs to the GitHub repo
/images/**
images/**
6 changes: 4 additions & 2 deletions msbuild-editor-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": {
"name": "Mikayla Hutchinson"
},
"icon": "images/icon.png",
"icon": "icon.png",
"repository": {
"type": "git",
"url": "https://github.com/mhutch/MonoDevelop.MSBuildEditor.git"
Expand Down Expand Up @@ -39,7 +39,9 @@
"lint": "eslint src --ext ts",
"test": "vscode-test",
"publish-server": "dotnet publish ../MSBuildLanguageServer/MSBuildLanguageServer.csproj --configuration Debug --output ./server",
"copy-vsix-assets": "cp ../LICENSE . && cp ../art/icon-128.png icon.png"
"copy-vsix-assets": "cp ../LICENSE . && cp ../art/icon-128.png icon.png",
"vsix-pack": "pwsh -c \"vsce package --baseImagesUrl https://github.com/mhutch/MonoDevelop.MSBuildEditor/raw/HEAD/msbuild-editor-vscode --no-update-package-json --no-git-tag-version --pre-release $(nbgv get-version -v NpmPackageVersion)\"",
"vsix-install": "pwsh -c \"npm run vsix-pack && code --install-extension msbuild-editor-$(nbgv get-version -v NpmPackageVersion).vsix\""
},
"dependencies": {
"@vscode/extension-telemetry": "^0.9.0",
Expand Down

0 comments on commit d1912ee

Please sign in to comment.