Skip to content

How To Contribute

Nikolay Blagoev edited this page Feb 22, 2022 · 4 revisions

Thanks for taking the time to contribute! 👍

When contributing to this project, please first discuss the changes you wish to make via an issue before making changes.

Table of Contents

Certificate of Origin

By contributing to this project you agree to the Developer Certificate of Origin. All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch.

Getting Started

Looking for places to contribute to the codebase? You can start by looking through the good-first-issue and help-wanted issues.

Getting the code

git clone https://github.com/vmware/vrealize-developer-tools.git

Prerequisites

VS Code Extension

Dependencies

From a terminal, where you have cloned the repository, execute the following command to install the required dependencies:

npm install

Building

During development you can use a watcher to make builds on changes quick and easy. From a terminal, where you have cloned the repository, execute the following command:

gulp watch

This will first do an initial full build and then watch for file changes, compiling those changes incrementally, enabling a fast, iterative coding experience.

💡Tip! You can press CMD+SHIFT+B (CTRL+SHIFT+B on Windows, Linux) to start the watch task.

💡Tip! You don't need to stop and restart the development version of VS Code after each change. You can just execute Reload Window from the command palette.

To do a complete rebuild, from a terminal, where you have cloned the repository, execute the following command:

gulp compile

Linting

This project uses eslint for code linting. You can run eslint across the code by calling gulp lint from a terminal. Warnings from eslint show up in the Errors and Warnings panel and you can navigate to them from inside VS Code.

To lint the code as you make changes you can install the ESLint extension.

📜NOTE! Linting rules that have auto-fixes available will be automatically applied on file save and during compilation.

Testing

To run the tests execute the following from a terminal:

gulp test

Bundling

To generate a VSIX (installation package) run the following from a terminal:

gulp package

Debugging

Using VS Code

  1. Open the vrealize-developer-tools folder
  2. Ensure the required dependencies are installed
  3. Start the watch task
  4. Choose the Launch Extension launch configuration from the launch dropdown in the Debug viewlet and press F5.

📜NOTE! In the [Extension Development Host] instance, the extension will be activated when any folder with vRO JavaScript code is opened AND one of the following events occurs.

  • a .o11n/ folder is located at the root of the opened project
  • a JavaScript or TypeScript file is opened in the editor
  • a vRealize: ... action is executed from the command palette

Make sure the window.openFoldersInNewWindow setting is not "on", otherwise a new, non-[Extension Development Host], window may be opened.

💡Tip! If you make edits to the code, just execute Reload Window from the command palette and the debugger will reattach.

Submitting a Pull Request

Please follow the instructions in the PR template.