Chevron DownAPI Reference

Development Environment

The master branch is the active development branch.

Building locally from the source requires node.js >=10. We use yarn to manage the dependencies.

git checkout master
yarn bootstrap

Running Tests

  • yarn bootstrap: Install and build workers etc. Run every time you pull a new branch.
  • yarn lint: Check coding standards and formatting
  • yarn lint fix: Fix errors with formatting
  • yarn test node: Quick test run under Node.js
  • yarn test browser: Test run under browser, good for interactive debugging
  • yarn test: Run lint, node test, browser tests (in headless mode)

Environment Setup

Note that our primary development environment is MacOS, but it is also possible to build on Linux and Windows.

Develop on Windows

It is possible to build on Windows 10, but not directly in the Windows command prompt. You will need to install a Linux command line environment.

First, install WSL (Windows Subsystem for Linux) on Windows 10, and follow the Linux directions.

Note that you may also need to make some decisions on where to place your code and whether to link the linux subsystem to your windows drives.

Once this is done, follow the instructions for developing on Linux.

Develop on Linux

On Linux systems, the following packages are necessary for running webgl-based headless render tests.

  • mesa-utils
  • xvfb
  • libgl1-mesa-dri
  • libglapi-mesa
  • libosmesa6
  • libxi-dev

To get the headless tests working: export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start

Appendix: Installing JavaScript Development Tools

You will of course need to install the basic JavaScript development tools. Unless you are new to JavaScript development you most likely already have these in place. The following should work on a linux system.

Install Node and NPM

sudo apt update
sudo apt install nodejs

Option: Install NVM


Install yarn

sudo apt update
sudo apt install yarn nodejs
yarn –version

Install jq

sudo apt-get install jq