mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-09 16:21:51 +00:00
Add a --watch command line flag to be used in tandem with --load-mod. Chokidar is used to detect file updates, and a page reload is triggered when there are any changes to watched mod files. Only mods loaded via --load-mod are affected. This implementation has a minor issue with how cache is cleared - removing disk cache is a bit too aggressive - but the only alternative I could find is to use a non-persistent Electron session, which would get rid of disk cache entirely (this is not a concern).
22 lines
447 B
JSON
22 lines
447 B
JSON
{
|
|
"name": "electron",
|
|
"version": "1.0.0",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"private": true,
|
|
"scripts": {
|
|
"start": "tsc && electron ."
|
|
},
|
|
"dependencies": {
|
|
"chokidar": "^4.0.3",
|
|
"semver": "^7.7.1",
|
|
"zod": "^3.24.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/semver": "^7.7.0",
|
|
"electron": "^31.3.0",
|
|
"typescript": "^5.8.2"
|
|
}
|
|
}
|