Local development
Prerequisites
- Node.js (version 20.x)
- Yarn
- Git
- Windows: Bash (e.g. Git Bash)
- Tampermonkey or Greasemonkey
Setup
To work on LSSM locally follow these steps:
Clone the repository to your local machine and use the
dev
branch:git clone -b dev https://github.com/LSS-Manager/LSSM-V.4.git
Install the dependencies:
yarn install
Modify the variable
urls.server
insrc/config.ts
to point to your local machine:export default { //... urls: { server: 'https://localhost:8080/', //... }, //... } as Config;
Run the dev build:
yarn dev
DX notes
The
dev
option will try to install Node.js via NVM as well as Yarn. If you already have these installed or want to install them yourself, please run the following commands instead:bash bash build/build.sh --dependencies bash build/build.sh --quick bash build/build.sh --userscript bash build/build.sh --prebuild bash build/build.sh --webpack
Start the development server, which will serve the
dist
folder onhttps://localhost:8080/
:yarn dev:serve
DX notes
If you have used another address in step 3, you will need to adjust the host/post in the
dev:serve
script inpackage.json
.Install the userscript in your browser: Open Tampermonkey/Greasemonkey and create a new script. Copy the contents of
dist/static/lssm-v4.user.js
into the script and save it.Beware of duplicate scripts
Please disable the production version of LSSM before enabling the development version.
Visit https://localhost:8080/ in your browser and accept the insecure self-signed certificate.
Reload the game website and you should see the development version of LSSM.