You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,15 +35,21 @@ Then clone the repository and install NPM packages:
35
35
36
36
### Run
37
37
38
-
You can run the extension from Visual Studio Code:
38
+
To run the extension from VSCode as a Node.js app:
39
39
40
40
1. Select the Run panel from the sidebar.
41
41
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.
42
+
3. Press `F5` to launch a new instance of VSCode with the extension installed and the debugger attached.
43
+
44
+
To run the extension from VSCode in "web mode" (a browser app, or "PWA"):
45
+
46
+
1. Select the Run panel from the sidebar.
47
+
2. From the dropdown at the top of the Run pane, choose `Extension (web)`.
48
+
3. Press `F5` to launch a new instance of VSCode (web mode) with the extension installed and the debugger attached.
43
49
44
50
### Build
45
51
46
-
When you launch the extension or run tests from Visual Studio Code, it will automatically build the extension and watch for changes.
52
+
When you launch the extension or run tests from VSCode, it will automatically build the extension and watch for changes.
47
53
48
54
You can also use these NPM tasks (see `npm run` for the full list):
49
55
@@ -118,7 +124,7 @@ You can also use these NPM tasks (see `npm run` for the full list):
118
124
See [TESTPLAN.md](./docs/TESTPLAN.md) to understand the project's test
119
125
structure, mechanics and philosophy.
120
126
121
-
You can run tests directly from Visual Studio Code:
127
+
You can run tests directly from VSCode:
122
128
123
129
1. Select `View > Debug`, or select the Debug pane from the sidebar.
124
130
2. From the dropdown at the top of the Debug pane, select the `Extension Tests` configuration.
@@ -343,7 +349,7 @@ Webviews can be hot-reloaded (updated without restarting the extension) by runni
343
349
344
350
### Font generation
345
351
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).
352
+
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).
347
353
348
354
As a simple example, let's say I wanted to add a new icon for CloudWatch log streams. I would do the following:
349
355
@@ -373,6 +379,18 @@ Note therefore:
373
379
2. `HEAD` implies that the URL depends on the current _default branch_ (i.e.
374
380
`master`). Changes to other branches won't affect the marketplace page.
375
381
382
+
## Using new vscode APIs
383
+
384
+
The minimum required vscode version specified in [package.json](https://github.com/aws/aws-toolkit-vscode/blob/07119655109bb06105a3f53bbcd86b812b32cdbe/package.json#L16)
385
+
is decided by the version of vscode running in Cloud9 and other vscode-compatible targets.
386
+
387
+
But you can still use the latest vscode APIs, by checking the current running vscode version. For example, to use a vscode 1.64 API:
388
+
389
+
1. Check the vscode version: `semver.gte(vscode.version, '1.64.0')`
390
+
2. Disable the feature if is too old. That could mean just skipping the code entirely, or showing a different UI.
391
+
392
+
Full example: https://github.com/aws/aws-toolkit-vscode/blob/7cb97a2ef0a765862d21842693967070b0dcdd49/src/shared/credentials/defaultCredentialSelectionDataProvider.ts#L54-L76
393
+
376
394
## Importing icons from other open source repos
377
395
378
396
If you are contribuing visual assets from other open source repos, the source repo must have a compatible license (such as MIT), and we need to document the source of the images. Follow these steps:
0 commit comments