Skip to content

Commit

Permalink
Compress Database Location Files (#954)
Browse files Browse the repository at this point in the history
Due to LFS storage issues... This PR removes all current LFS files (the
location loot files) and replaces them with a single 7-zip archive. The
archive is stored in LFS, but has decreased in size by roughly 95%.

The location `.json` files are now git-ignored.

There are two new npm commands to aid in working with the archive:
- `npm run database:compress`  
Compresses the JSON files into an archive *which can be committed into
the project*.
- `npm run database:decompress`  
Decompresses the archive into the original JSON files located in the
working directory.

The gulp file that handles builds has been updated to ensure that the
archive files are *always* used when a build is processed, regardless of
if the JSON files are already present in the working directory.
  • Loading branch information
refringe authored Nov 28, 2024
1 parent 464fa27 commit f558615
Show file tree
Hide file tree
Showing 103 changed files with 371 additions and 123,596 deletions.
62 changes: 1 addition & 61 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,64 +1,4 @@
# Normalize Line Endings
* text=auto eol=lf

# LFS File Listing
project/assets/database/locations/interchange/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/interchange/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/interchange/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/interchange/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/lighthouse/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/lighthouse/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/lighthouse/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/lighthouse/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/shoreline/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/shoreline/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/shoreline/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/shoreline/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/tarkovstreets/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/tarkovstreets/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/tarkovstreets/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/tarkovstreets/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/woods/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/woods/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/woods/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/woods/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/factory4_day/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/factory4_day/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/factory4_day/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/factory4_day/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/factory4_night/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/factory4_night/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/factory4_night/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/factory4_night/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/rezervbase/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/rezervbase/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/rezervbase/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/rezervbase/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/bigmap/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/bigmap/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/bigmap/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/bigmap/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/laboratory/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/laboratory/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/laboratory/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/laboratory/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/sandbox/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/sandbox/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/sandbox/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/sandbox/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/database/locations/sandbox_high/looseLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/sandbox_high/staticLoot.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/sandbox_high/staticContainers.json filter=lfs diff=lfs merge=lfs -text
project/assets/database/locations/sandbox_high/staticAmmo.json filter=lfs diff=lfs merge=lfs -text

project/assets/compressed/database/locations.7z filter=lfs diff=lfs merge=lfs -text
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.exe
*.zip
*.d.ts
project/assets/database/locations/
project/build/
project/obj/
project/dist/
Expand Down Expand Up @@ -32,6 +33,9 @@ yarn.lock
## windows
desktop.ini

## OSX
.DS_Store

## parcel
.parcel-cache/

Expand Down
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,29 @@ To prepare the project for development you will need to:

The following commands are available after the initial setup. Run them with `npm run <command>`.

| Command | Description |
|----------------------|---------------------------------------------------------------------------|
| `check:circular` | Check for circular dependencies in the project. |
| `lint` | Check the project for coding standards issues using Biome. |
| `lint:fix` | Automatically fix coding standards issues using Biome. |
| `style` | Check the project for formatting issues using Biome. |
| `style:fix` | Automatically fix formatting issues using Biome. |
| `format` | Automatically fix all coding standards and formatting issues using Biome. |
| `test` | Run all tests. |
| `test:watch` | Run tests in watch mode. Tests will re-run when files are changed. |
| `test:coverage` | Run tests and generate a coverage report. |
| `test:ui` | Run tests in UI mode. This will open a browser window to view tests. |
| `build:release` | Build the project for release. |
| `build:debug` | Build the project for debugging. |
| `build:bleeding` | Build the project on the bleeding edge. |
| `build:bleedingmods` | Build the project on the bleeding edge with mods. |
| `run:build` | Run the project in build mode. |
| `run:debug` | Run the project in debug mode. |
| `run:profiler` | Run the project in profiler mode. |
| `gen:types` | Generate types for the project. |
| `gen:docs` | Generate documentation for the project. |
| Command | Description |
|-----------------------|---------------------------------------------------------------------------|
| `check:circular` | Check for circular dependencies in the project. |
| `lint` | Check the project for coding standards issues using Biome. |
| `lint:fix` | Automatically fix coding standards issues using Biome. |
| `style` | Check the project for formatting issues using Biome. |
| `style:fix` | Automatically fix formatting issues using Biome. |
| `format` | Automatically fix all coding standards and formatting issues using Biome. |
| `test` | Run all tests. |
| `test:watch` | Run tests in watch mode. Tests will re-run when files are changed. |
| `test:coverage` | Run tests and generate a coverage report. |
| `test:ui` | Run tests in UI mode. This will open a browser window to view tests. |
| `build:release` | Build the project for release. |
| `build:debug` | Build the project for debugging. |
| `build:bleeding` | Build the project on the bleeding edge. |
| `build:bleedingmods` | Build the project on the bleeding edge with mods. |
| `run:build` | Run the project in build mode. |
| `run:debug` | Run the project in debug mode. |
| `run:profiler` | Run the project in profiler mode. |
| `gen:types` | Generate types for the project. |
| `gen:docs` | Generate documentation for the project. |
| `database:compress` | Compress database files from working directory into archive. |
| `database:decompress` | Decompress database archives into working directory. |

### Debugging

Expand Down
3 changes: 3 additions & 0 deletions project/assets/compressed/database/locations.7z
Git LFS file not shown
32 changes: 0 additions & 32 deletions project/assets/database/locations/base.json

This file was deleted.

Loading

0 comments on commit f558615

Please sign in to comment.