This document helps you setting up the developer environment. It is useful if you would like to contribute to the codebase of the engine or the website.
After cloning the repository run these commands from the root directory.
npm install
npm start
This will compile the development version of the code and start a web server. Now you can open http://localhost:8080
to check the result.
The solution is implemented as ES6 modules. It means that it must be bundled together to one file to make it usable on the website. The development and production environment is separated, see the Scripts section for more details.
build
folder. The code of the website references this directly during development, so you can just open the website
folder and try it out.build
folder. In this case all the required files are copied to this folder so you can just upload it to any web server to make it work.The source contains the following folders.
Several scripts are available for building, testing and publishing.
Building
npm run build_dev
: Builds the development version of the engine and the website.npm run build_engine_dev
: Builds the development version of the engine.npm run build_engine
: Builds the production version of the engine.npm run build_engine_module
: Builds the ES6 module version of the engine. This is the main entry point when using the npm package.npm run build_website_dev
: Builds the development version of the website.npm run build_website
: Builds the production version of the website.Testing
npm run test
: Runs all unit tests.npm run lint
: Runs eslint on the codebase.Packaging
npm run create_package
: Generates the production version of the engine and the website.npm run create_dist
: Generates the production version of the engine and the website, and runs all the possible checks.Tools
npm run generate_docs
: Generates this documentation.npm run generate_icon_font
: Generates the icon font used on the website.npm run update_libs
: Updates the used external libraries.