The following tools or applications are required to develop the web client:
It does not matter which IDE you use,
you could even use a command line text editor for developing.
For building and serving you require nodejs
grater than 8.
Nodejs is easily downloadable from here.
Ensure you've added node.exe
to the environment path!
Normally NPM already comes with the NodeJS installer.
So you don't really have to worry about it.
NPM min 6.X is required to develop this project.
With NPM you could easily download all required dependencies by just typing npm install
.
IMPORTANT: NPM must be available within the PATH environment variable!
For using the .sh
build scripts you require Git Bash.
A minimum of 4.2 is recommend, but in general every modern version should work.
To clone the WebClient simply use:
git clone https://github.com/TeaSpeak/TeaWeb.git
After closing the project you've to update the submodules.
Simply execute:
git submodule update --init --recursive
To download all required packages simply type:
npm install
In order to build the project you need some libraries and applications (rustup
and wasm-pack
).
To install them, just execute:
./scripts/install_dependencies.sh
You may need to follow some additional steps, depending on the scripts output.
Attention: If you've not installed rustup
or wasm-pack
, you may need to restart the bash,
since the path variable needs to be updated. If you don't want to do so, you may just run:
source ./scripts/install_dependencies.sh
Attention: On error it will close your bash session with an exit code of 1!
To start the development environment which automatically compiles all your changed
scripts and style sheets you simply have to execute:
npm start web
This will also spin up a temporary web server where you could test out your newest changes.
The server will by default listen on http://localhost:8081
An explanation how this works will come later. Stay tuned!
In order to build your own TeaWeb-Package just execute the scripts/build.sh
script.
./scripts/build.sh web rel # Build the web client
./scripts/web_package.sh rel # Bundle the webclient into one .zip archive
You could also create a debug packaged just by replacing rel
with dev
.