Skip to content

How to Contribute

Anup N. Kamath edited this page Mar 18, 2019 · 3 revisions

Contributor Guide

The instructions below will help you set up your development environment to contribute to this repository. Make sure you've already cloned the repo. 😄

Ways to Contribute

Interested in contributing to the vscode-postgresql project? There are plenty of ways to contribute, all of which help make the project better.

Set up Node, npm and gulp

Node and npm

Windows and Mac OSX: Download and install node from nodejs.org

Linux: Install using package manager

From a terminal ensure at least node 6.3.1 and npm 3:

$ node -v && npm -v
v6.3.1
3.8.2

Note: To get npm version 3.8.2, you may need to update npm after installing node. To do that:

[sudo] npm install npm -g

Gulp

Install gulp command line tools. The latest version (3.9.1) may cause problems so version 1.2.2 is recommended.

[sudo] npm install gulpjs/gulp-cli -g

From the root of the repo, install all of the build dependencies:

[sudo] npm install --greedy
[sudo] npm run install-packages

Install the Visual Studio Code Extension Manager (VSCE)

Before packaging via gulp, ensure that you have the "vsce" tool installed globally. Otherwise, the package step will fail.

From the root of the repo, run:

[sudo] npm install vsce -g

Build

To build the extension, run the following from the root of the repo:

gulp build

This command will create the out\src and out\test folders at the root of the repository.

Tests

Tests should be run with changes. Before you run tests, make sure you have built the extension. Run the following from the root of the repo:

gulp test

To run the tests within Visual Studio Code, change the debug profile to "Launch Tests" and press F5.

Package

The package command will package the extension into a Visual Studio extension installer (.vsix file). It will also transpile the TypeScript into the out\src and out\test folders.

From the root of the repo:

gulp package:online

The VSIX package will be created in the root of the repository.

Contribution License Agreement

In order to contribute, you will need to sign a Contributor License Agreement. All you need to do is to submit a pull request, then the PR will get appropriately labeled (e.g. cla-required, cla-norequired, cla-signed, cla-already-signed). If you already signed the agreement we will continue with reviewing the PR, otherwise system will tell you how you can sign the CLA. Once you sign the CLA all future PR's will be labeled as cla-signed.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Submitting Pull Requests

We welcome pull requests! Fork this repo and send us your contributions. Go here to get familiar with GitHub pull requests.

Before submitting your request, ensure that both gulp build and gulp test succeed.

Clone this wiki locally