Skip to content

Commit ea40f55

Browse files
committed
Add package icon and fix README.md image paths
For images in the README.md, VS Code doesn't respect images in the package. Instead, it generates https paths to the images in the repo.
1 parent ac0f055 commit ea40f55

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ node_modules
1212
.vscode-test
1313
dist
1414

15+
# these are copied during vsix packaging
1516
/msbuild-editor-vscode/LICENSE
1617
/msbuild-editor-vscode/server
1718
/msbuild-editor-vscode/*.vsix
19+
/msbuild-editor-vscode/icon.png

art/icon-128.png

8.16 KB
Loading

msbuild-editor-vscode/.vscodeignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ node_modules/**
55
src/**
66
.gitignore
77
.yarnrc
8-
webpack.config.js
9-
vsc-extension-quickstart.md
108
**/tsconfig.json
119
**/.eslintrc.json
1210
**/*.map
1311
**/*.ts
14-
**/.vscode-test.*
12+
**/.vscode-test.*
13+
14+
# the images for the README.md are in this directory so the paths
15+
# are correct when the README.md is viewed in the repo. however, they
16+
# are not needed in the vsix as README.md in the generated package
17+
# has the paths rewritten to https URLs to the GitHub repo
18+
/images/**

msbuild-editor-vscode/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,37 @@ The extension is also available [for Visual Studio](https://marketplace.visualst
1616

1717
MSBuild-specific IntelliSense helps you write your project and target files, with rich contextual completion for MSBuild elements, attributes and expressions.
1818

19-
![Property completion](images/vscode-nowarn-completion.png)
19+
![Property completion](./images/vscode-nowarn-completion.png)
2020

2121
The completion for `PackageReference` attributes queries NuGet.org as you type, and provides completion for package names and package versions.
2222

23-
![Package reference completion](images/vscode-packageref-completion.png)
23+
![Package reference completion](./images/vscode-packageref-completion.png)
2424

2525
There's completion for MSBuild expressions, including condition comparisons, property functions and item functions. The editor also supports *Expand Selection* within MSBuild expressions.
2626

27-
![Expression completion](images/vscode-expression-completion.png)
27+
![Expression completion](./images/vscode-expression-completion.png)
2828

29-
![Condition completion](images/vscode-condition-completion.png)
29+
![Condition completion](./images/vscode-condition-completion.png)
3030

3131
### Navigation
3232

3333
You can use the *Go to Definition* command or *Ctrl-Click* to navigate to any import, SDK or filename. If an import has multiple valid ways it can be evaluated, you can navigate to any of them. When navigating to an SDK, you can navigate to any of the `.props` and `.targets` in it.
3434

3535
The *Find References* command can accurately and precisely find all references to items, properties, metadata and tasks throughout your project and its imports, including in expressions.
3636

37-
![Find References](images/vscode-find-references.png)
37+
![Find References](./images/vscode-find-references.png)
3838

3939
### Quick Info
4040

4141
Quick Info tooltips for items, properties, metadata and values allow you to see their descriptions and expected value types, with deep links into documentation. Tooltips for imports and SDKs show you the paths of the imported files.
4242

43-
![Quick info](images/vscode-quick-info.png)
43+
![Quick info](./images/vscode-quick-info.png)
4444

4545
### Validation and Analyzers
4646

4747
The editor validates your document against the MSBuild language and any imported schemas, and shows these errors and warnings as you type.
4848

49-
![Unknown value validation](images/vscode-validation.png)
49+
![Unknown value validation](./images/vscode-validation.png)
5050

5151
The core validator performs several other diagnostics such as warning about unused symbols, and there is a Roslyn-like analyzer mechanism, and examples of current built-in analyzers include:
5252

@@ -57,15 +57,15 @@ The core validator performs several other diagnostics such as warning about unus
5757

5858
The editor supports code fixes for several diagnostics, and has refactorings such as *Extract Expression*.
5959

60-
![Code fix for misspelled property value](images/vscode-code-fix.png)
60+
![Code fix for misspelled property value](./images/vscode-code-fix.png)
6161

6262
### Schemas
6363

6464
In addition to the schema inferred from the items, metadata, properties and tasks used in a project's imports, the extension also defines a json-based MSBuild-specific schema format that can be used to provide documentation, type annotations, allowed values, and other information that is used to provide a richer editing and validation experience.
6565

6666
Any targets file can provide a schema 'sidecar', which has the same name as the targets file except with the suffix `.buildschema.json`. The editor will load the sidecar schemas for any targets that it imports. This allows MSBuild targets to provide their own documentation.
6767

68-
![Schema for MSBuild items](images/vscode-schema.png)
68+
![Schema for MSBuild items](./images/vscode-schema.png)
6969

7070
The extension includes built-in schemas for `Microsoft.Common.targets`, `Microsoft.NET.Sdk`, and other common targets and MSBuild SDKs.
7171

msbuild-editor-vscode/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"author": {
99
"name": "Mikayla Hutchinson"
1010
},
11+
"icon": "images/icon.png",
1112
"repository": {
1213
"type": "git",
1314
"url": "https://github.com/mhutch/MonoDevelop.MSBuildEditor.git"
@@ -25,7 +26,7 @@
2526
"activationEvents": [],
2627
"main": "./dist/extension.js",
2728
"scripts": {
28-
"vscode:prepublish": "cp ../LICENSE . && npm run publish-server && npm run package",
29+
"vscode:prepublish": "npm run publish-server && npm run copy-vsix-assets && npm run package",
2930
"compile": "npm run check-types && npm run lint && node esbuild.js",
3031
"watch": "npm-run-all -p watch:*",
3132
"watch:esbuild": "node esbuild.js --watch",
@@ -37,7 +38,8 @@
3738
"check-types": "tsc --noEmit",
3839
"lint": "eslint src --ext ts",
3940
"test": "vscode-test",
40-
"publish-server": "dotnet publish ../MSBuildLanguageServer/MSBuildLanguageServer.csproj --configuration Debug --output ./server"
41+
"publish-server": "dotnet publish ../MSBuildLanguageServer/MSBuildLanguageServer.csproj --configuration Debug --output ./server",
42+
"copy-vsix-assets": "cp ../LICENSE . && cp ../art/icon-128.png icon.png"
4143
},
4244
"dependencies": {
4345
"@vscode/extension-telemetry": "^0.9.0",

0 commit comments

Comments
 (0)