Files
Bubberstation/tools/build
SkyratBot bc7a7efc28 [MIRROR] tgui-bench (#8078)
* tgui-bench (#61081)

Added a package that allows precisely benchmarking tgui components on IE11 without having the game launched.

It has a convenient syntax for writing tests, just create a file packages/tgui-bench/tests/*.test.tsx, and export a function which you want to benchmark

Performance improvements
As part of this PR, I have also improved the raw performance of some tgui components:

Button component - 1.8x faster
Flex component - 1.1x faster
Stack component - 1.3x faster
This improves performance of heavy UIs by a tiny bit.

* tgui-bench

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-09-09 18:53:29 +01:00
..
2021-09-09 18:53:29 +01:00

/tg/station build script

This build script is the recommended way to compile the game, including not only the DM code but also the JavaScript and any other dependencies.

  • VSCode: a) Press Ctrl+Shift+B to build. b) Press F5 to build and run with debugger attached.
  • Windows: a) Double-click BUILD.bat in the repository root to build (will wait for a key press before it closes). b) Double-click tools/build/build.bat to build (will exit as soon as it finishes building).
  • Linux: a) Run tools/build/build from the repository root.

The script will skip build steps whose inputs have not changed since the last run.

Getting list of available targets

You can get a list of all targets that you can build by running the following command:

tools/build/build --help

Dependencies

  • On Windows, build.bat will automatically install a private (vendored) copy of Node.
  • On Linux, install Node using your package manager or from https://nodejs.org/en/download/.
  • On Linux, unless using tgs4 or later you will need to compile rust-g on the server and obtain a .so file, for instructions see https://github.com/tgstation/rust-g

Why?

We used to include compiled versions of the tgui JavaScript code in the Git repository so that the project could be compiled using BYOND only. These pre-compiled files tended to have merge conflicts for no good reason. Using a build script lets us avoid this problem, while keeping builds convenient for people who are not modifying tgui.

This build script is based on Juke Build - follow the link to read the documentation for the project and understand how it works and how to contribute.