Skip to content

Commit e2a199c

Browse files
committed
build: configure problemMatcher for web mode
Also rearrange launch configs to be more discoverable.
1 parent 19043f3 commit e2a199c

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

.vscode/launch.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,13 @@
2424
"preLaunchTask": "watch"
2525
},
2626
{
27-
"name": "Attach to ASL Server",
28-
"type": "node",
29-
"request": "attach",
30-
"port": 6009,
31-
"restart": true,
32-
"outFiles": ["${workspaceRoot}/dist/src/stepFunctions/asl/**.js"]
33-
},
34-
{
35-
"name": "Attach to SSM Document Language Server",
36-
"type": "node",
37-
"request": "attach",
38-
"port": 6010,
39-
"restart": true,
40-
"outFiles": ["${workspaceRoot}/dist/src/ssmDocument/ssm/ssmServer.js"]
27+
"name": "Extension (web)",
28+
"type": "pwa-extensionHost",
29+
"debugWebWorkerHost": true,
30+
"request": "launch",
31+
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--extensionDevelopmentKind=web"],
32+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
33+
"preLaunchTask": "${defaultBuildTask}"
4134
},
4235
{
4336
"name": "Extension (webpack)",
@@ -147,13 +140,20 @@
147140
"preLaunchTask": "${defaultBuildTask}"
148141
},
149142
{
150-
"name": "Run Web Extension ",
151-
"type": "pwa-extensionHost",
152-
"debugWebWorkerHost": true,
153-
"request": "launch",
154-
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--extensionDevelopmentKind=web"],
155-
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
156-
"preLaunchTask": "${defaultBuildTask}"
143+
"name": "Attach to ASL Server",
144+
"type": "node",
145+
"request": "attach",
146+
"port": 6009,
147+
"restart": true,
148+
"outFiles": ["${workspaceRoot}/dist/src/stepFunctions/asl/**.js"]
149+
},
150+
{
151+
"name": "Attach to SSM Document Language Server",
152+
"type": "node",
153+
"request": "attach",
154+
"port": 6010,
155+
"restart": true,
156+
"outFiles": ["${workspaceRoot}/dist/src/ssmDocument/ssm/ssmServer.js"]
157157
}
158158
],
159159
"compounds": [

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"label": "watch",
88
"type": "npm",
99
"script": "watch",
10-
"problemMatcher": "$tsc-watch",
10+
"problemMatcher": ["$tsc-watch", "$ts-webpack-watch"],
1111
"isBackground": true,
1212
"group": {
1313
"kind": "build",

CONTRIBUTING.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ issues.
1919
To develop this project, install these dependencies:
2020

2121
- [Visual Studio Code](https://code.visualstudio.com/Download)
22+
- [TypeScript + Webpack Problem Matcher](https://marketplace.visualstudio.com/items?itemName=amodio.tsl-problem-matcher) (for `$ts-webpack-watch` problemMatcher in `tasks.json`)
2223
- [NodeJS and NPM](https://nodejs.org/) (latest version of both)
2324
- [Typescript](https://www.typescriptlang.org/)
2425
- [Git](https://git-scm.com/downloads)
@@ -35,15 +36,21 @@ Then clone the repository and install NPM packages:
3536

3637
### Run
3738

38-
You can run the extension from Visual Studio Code:
39+
To run the extension from VSCode as a Node.js app:
3940

4041
1. Select the Run panel from the sidebar.
4142
2. From the dropdown at the top of the Run pane, choose `Extension`.
42-
3. Press `F5` to launch a new instance of Visual Studio Code with the extension installed and the debugger attached.
43+
3. Press `F5` to launch a new instance of VSCode with the extension installed and the debugger attached.
44+
45+
To run the extension from VSCode in "web mode" (a browser app, or "PWA"):
46+
47+
1. Select the Run panel from the sidebar.
48+
2. From the dropdown at the top of the Run pane, choose `Extension (web)`.
49+
3. Press `F5` to launch a new instance of VSCode (web mode) with the extension installed and the debugger attached.
4350

4451
### Build
4552

46-
When you launch the extension or run tests from Visual Studio Code, it will automatically build the extension and watch for changes.
53+
When you launch the extension or run tests from VSCode, it will automatically build the extension and watch for changes.
4754

4855
You can also use these NPM tasks (see `npm run` for the full list):
4956

@@ -118,7 +125,7 @@ You can also use these NPM tasks (see `npm run` for the full list):
118125
See [TESTPLAN.md](./docs/TESTPLAN.md) to understand the project's test
119126
structure, mechanics and philosophy.
120127
121-
You can run tests directly from Visual Studio Code:
128+
You can run tests directly from VSCode:
122129
123130
1. Select `View > Debug`, or select the Debug pane from the sidebar.
124131
2. From the dropdown at the top of the Debug pane, select the `Extension Tests` configuration.
@@ -343,7 +350,7 @@ Webviews can be hot-reloaded (updated without restarting the extension) by runni
343350

344351
### Font generation
345352

346-
For extensions to contribute their own codicons, VS Code requires a font file as well as how that font maps to codicon IDs. The mapping is found in `package.json` under the `icons` contribution point. Icons located in `resources/icons` are stitched together at build-time into a single font, automatically adding mappings to `package.json`. More information can be found [here](docs/icons.md).
353+
For extensions to contribute their own codicons, VSCode requires a font file as well as how that font maps to codicon IDs. The mapping is found in `package.json` under the `icons` contribution point. Icons located in `resources/icons` are stitched together at build-time into a single font, automatically adding mappings to `package.json`. More information can be found [here](docs/icons.md).
347354

348355
As a simple example, let's say I wanted to add a new icon for CloudWatch log streams. I would do the following:
349356

0 commit comments

Comments
 (0)