-
-
Notifications
You must be signed in to change notification settings - Fork 43
Lishogi Development Setup
This guide assumes you use linux, so while you can make this work on other platforms, it might take some more tinkering on your part.
First clone lishogi repository:
git clone https://github.com/WandererXII/lishogi.git
cd lishogi
You should have the following tools installed.
node
pnpm
Specific versions specified in root package.json
-
java
(JDK 17) -
sbt
(^1)
-
mongodb
(^4.0) -
redis
(^7.2)
You probably won't need these:
-
python
(^3.13) - linting translations, regenerating sbt modules build order
First run pnpm install
, after that simply run pnpm ui:build
. This builds everything. If you also want to watch for changes and rebuild as is necessary you can run pnpm ui:build:watch
.
Start the sbt console with ./lila.sh
. After the initial load, type compile
, this will take several minutes for the first time. After it's done make sure mongodb
and redis
is running, then type run
into the sbt console. Go to http://localhost:9663/
, you will have to wait another minute before you get the first response. if everything went well you should now have lishogi dev version running locally.
See that red popup saying reconnecting, you will probably also need websockets. Clone https://github.com/WandererXII/lila-ws, cd lila-ws
type sbt
, when the console loads type compile
. After the compilation is done, type reStart
. And that's it.
Please make sure your changes are properly formatted. Use scalafmtAll
inside sbt console for scala code changes, scalafmtSbt
for changes to sbt build.
After changes to the frontend code please run pnpm ui:format:fix
, then run pnpm ui:lint
to list issues found by linters and pnpm ui:lint:fix
to fix them, some of the issues might have to be fixed manually, so make sure to run pnpm ui:lint
again.
Also don't forget to run type-checking: pnpm run ui:type-check
.
I use these .vscode/settings.json
for lishogi.
{
"files.watcherExclude": {
"target": true,
"node_modules": true,
"logs": true,
"dist": true
},
"typescript.preferences.preferTypeOnlyAutoImports": true,
"typescript.tsdk": "node_modules/typescript/lib",
"biome.lspBin": "node_modules/@biomejs/biome/bin/biome",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "always"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit"
}
}
}