The master branch is the active development branch.
Building loaders.gl locally from the source requires node.js >=10
.
We use yarn to manage the dependencies.
git checkout master
yarn bootstrap
yarn bootstrap
: Install and build workers etc. Run every time you pull a new branch.yarn lint
: Check coding standards and formattingyarn lint fix
: Fix errors with formattingyarn test node
: Quick test run under Node.jsyarn test browser
: Test run under browser, good for interactive debuggingyarn test
: Run lint, node test, browser tests (in headless mode)Note that our primary development environment is MacOS, but it is also possible to build loaders.gl on Linux and Windows.
It is possible to build loaders.gl 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.
On Linux systems, the following packages are necessary for running webgl-based headless render tests.
To get the headless tests working: export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
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.
sudo apt update
sudo apt install nodejs
https://www.liquidweb.com/kb/how-to-install-nvm-node-version-manager-for-node-js-on-ubuntu-12-04-lts/
https://github.com/nvm-sh/nvm/releases
https://www.hostinger.com/tutorials/how-to-install-yarn-on-ubuntu/
sudo apt update
sudo apt install yarn nodejs
yarn –version
sudo apt-get install jq