Skip to content

Project setup

The Web APIs are vast and ever-growing. We need your help to make them better.
There is no way our contributors can cover everything.
And that’s where you come in! A small PR, focused on what you want to get out of this project can make a huge difference.

We recommend the following overall workflow when developing for this repository:

  • Fork this repository
  • Always work in your fork
  • Always keep your fork up to date

Add the upstream repository once, if it is not already configured:

Terminal window
git remote add upstream https://github.com/rescript-lang/experimental-rescript-webapi.git

Check git remote -v first to avoid adding the same remote twice.

Update main without deleting local files or untracked work:

Terminal window
git checkout main
git fetch upstream
git merge --ff-only upstream/main
git push

The fast-forward-only merge stops rather than rewriting history if your fork’s main has diverged. Keep work on feature branches; commit or stash changes before switching branches. This updates your local main from upstream and pushes it to your fork’s configured origin.

Install the dependencies and compile the bindings using ReScript:

Terminal window
npm install && npm run build