This document is a guide to help you through the process of contributing to the grafana-vs-code-extension
.
Fork, then clone the repository:
git clone [email protected]:{your_github_username}/grafana-vs-code-extension.git
cd grafana-vs-code-extension
git remote add upstream https://github.com/grafana/grafana-vs-code-extension.git
git fetch upstream
This repository relies on devbox to manage all the tools and dependencies needed for its development.
A shell including all the required tools is accessible via:
devbox shell
This shell can be exited like any other shell, with exit
or CTRL+D
.
One-off commands can be executed within the devbox shell as well:
devbox run node --version
devbox run yarn install
Compile the extension, and keep watching for changes:
devbox run yarn watch
Open this repository in VS Code, then press F5
to start the extension locally.
To make changes to this codebase, follow the instructions on running the extension. Then, in your original VS Code window, make changes to the code base.
Restart the extension with either CTRL + SHIFT + F5 (CMD + SHIFT + F5 on a Mac) or by clicking the green restart circle.
Debug logs and dev tools can be accessed with CTRL + SHIFT + I on the VS Code development host.
Releasing is a two step process:
- Prepare the release by updating the version number in
package.json
and describing what changed in theCHANGELOG.md
file. See the release preparation commit forv0.0.19
. Open a pull request for this commit, get it reviewed and merged. - Trigger the release pipeline by creating and pushing a tag:
git tag {version} && git push origin {version}
Note
The release pipeline creates and publishes a .vsix
artifact to Open VSX, the Visual Studio Marketplace, as well as a GitHub release.