You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains a vendored copy of `games.json`, along with tooling to generate it.
2
+
3
+
## Purpose
4
+
5
+
The games data is fetched at runtime by NexusMods.App, however it is also included at build time for two reasons:
6
+
7
+
1. It allows tests to run against real data.
8
+
2. It is used as cached data, speeding up the app's initial run.
9
+
10
+
It is not vital for the file to contain all games, however ideally it should contain all games _supported_ by this version of NexusMods.App.
11
+
That way the initial run's cached data is more useful.
12
+
13
+
If this file grows too large, because we are including too many games, we can patch the `csproj` build spec so that `games.json` is not used at build time.
14
+
We would also need to patch or disable any tests that rely on it.
15
+
16
+
## Generating
17
+
18
+
`games.json` is generated automatically by `update.sh`, using data from [nexusmods' API][url] and the games listed in `game-ids.nix`.
19
+
20
+
To add a new game to `games.json`:
21
+
- Inspect the [nexusmods endpoint][url] to find the game's name and ID
22
+
- Add the name and ID to `game-ids.nix`
23
+
- Run `update.sh`
24
+
- Commit the result
25
+
26
+
> [!Note]
27
+
> Running `update.sh` may also update the existing games, so you may wish to create two separate commits using `git add --patch`.
28
+
> One for updating the existing data and another for adding the new game.
0 commit comments