tabletopsimulator-lua-vscode
tabletopsimulator-lua-vscode copied to clipboard
Best way to commit the main json file?
The main json (ex. 123456789.json) file have a lot of info not extracted by this extension. What is the best way to get this file into source control (git) along with everything else?
Only option I see right now is to manually copy this file to the vscode folder. But since it also contains the scripts it's bound to get out of sync at some point.
Looking for advice
I ended up moving that file into my repo and then symlinking it to the game directory. Even though this question isn't specific to this extension, I'd still be curious to know how other people handled this. (I may have done the symlink in the other direction; can't remember now.)
If you decide to do it this way, remember to always overwrite that save from within the game.
Hmm perhaps we can write a main json file adapter which can extract the json and write it to the workspace folder, and also write the json back to the TTS folder.
Extraction should support
- removing scripts as they're already extracted via other means
- splitting the jons into multiple files
Writing should support
- overriding or modifying the json file in the TTS folder, but do something clever with the scripts so they don't get out of sync
- joining multiple json files into one file
There's lots and lots of edge cases here. I this even a good idea?
It's not that it's a bad idea, but the scope seems pretty large. If TTS ever changes the structure of their exported JSON even a little, it could become a maintenance nightmare. Beyond the convenience of a well-structured project directory, what benefits would be gained over symlinking, given that you can currently edit the JSON directly?