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
+29-12Lines changed: 29 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,10 @@ There are only a few guidelines that we need contributors to follow.
8
8
## First Time Setup
9
9
1. Install prerequisites:
10
10
* latest [Visual Studio Code](https://code.visualstudio.com/)
11
-
*[Node.js](https://nodejs.org/) v4.0.0 or higher
11
+
*[Node.js](https://nodejs.org/) v16.17.0 or higher
12
+
* It is recommended to set up `nvm` to manage different versions of node, which can be installed by following the instructions [here](https://github.com/nvm-sh/nvm#installing-and-updating).
13
+
* To use the current recommended version for this project (in`./nvmrc`), run `nvm use`.
14
+
12
15
2. Fork and clone the repository
13
16
3.`cd vscode-openshift-tools`
14
17
4. Install the dependencies:
@@ -18,22 +21,36 @@ There are only a few guidelines that we need contributors to follow.
18
21
```
19
22
5. Open the folder in VS Code
20
23
21
-
## Run the extension locally
24
+
## Run and debug the extension locally
25
+
26
+
1. Build with the following command at least once before running in debug mode:
27
+
28
+
```bash
29
+
$ npm run build
30
+
```
31
+
32
+
* This downloads the `oc` and `odo` binaries and compiles webviews.
33
+
2. The extension can now be launched with the `Extension` launch option in the Run and Debug tab (`Ctrl+Shift+D`) in VS Code.
34
+
* Note: breakpoints in webview code will not work
35
+
3. After making any changes, consider the following before relaunching the extension to ensure the changes are recompiled:
36
+
* Changes made to webviews in `src/webview/$WEBVIEW_NAME/app` can be compiled with the corresponding command:
37
+
38
+
```bash
39
+
$ npm run dev:compile:$WEBVIEW_NAME
40
+
```
22
41
23
-
1. Install `vsce` - A command line tool you'll use to publish extensions to the Extension Marketplace.
24
-
```bash
25
-
$ npm install -g vsce
26
-
```
27
-
2. From root folder, run the below command.
28
-
```bash
29
-
$ vsce package
30
-
```
31
-
3. `openshift-toolkit-<version>.vsix` file is created. Install it by following the instructions [here](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix).
42
+
* The list of commands to build the webviews can be found in`package.json` or by running `npm run`
43
+
* Changes in version of one of the required tools in`src/tools.json`, run:
32
44
45
+
```bash
46
+
$ npm run bundle-tools
47
+
```
33
48
49
+
* Any other changes should be recompiled automatically by the VS Code prelaunch task.
50
+
* The launch will be prevented if there are compilation errors.
34
51
4. Once the extension is installed and reloaded, there will be an OpenShift Icon on the View Container, on the lines of snap mentioned below.
0 commit comments