Depot, the structured data editor for VS Code, is available now!
October 11, 2020
The work I outlined in the previous posts about building a game data editor inside of VS Code has culminated to an actual release! And it’s got a name:
Depot is a structured data editor for Visual Studio Code that leverages Code’s Custom Editor API to allow you to edit JSON data like a spreadsheet. Data you would normally store in raw JSON or XML can instead be stored, edited, and managed, all through a single Depot file.
You can also manually create a Depot file by creating a file with this as its contents and giving it a .dpo
extension:
{
sheets:[]
}
Note that once Depot is installed, the extension will try to open any file with .dpo
through the Depot editor. If you want to manually create a Depot file, I suggest creating the file as a .txt
file, adding the above contents, then changing the file’s extension to .dpo
.
You can also use a custom file extension for Depot by editing your settings.json
file and adding the following line:
"workbench.editorAssociations": [
{
"viewType": "depot.data",
"filenamePattern": "*.foo"
},
{
"viewType": "depot.data",
"filenamePattern": "*.bar"
}
]
In the above example, clicking on a file with .foo
or .bar
would also open that file for editing in Depot.
A Depot file (.dpo
) is just JSON, but unlike normal JSON it’s organized through Sheets, Lines, and Columns.
At the highest level, a Depot file consists of some number of sheets. These sheets are invididual collections of structured data, with the added benefit that they can also reference each other.
A given sheet also has some number of lines. You can think of a sheet’s lines as entries in the database defined by the sheet. Lines have data based on what columns are in the sheet it is a part of.
Columns define the fields of a sheet that a line can have data for. Columns can be specific primitive types (string
, bool
, int
, etc.), but can also be other special types unique to Depot:
Like I said at the start of the game data editor post, Depot would be nowhere without the work Nicholas Canasse did on CastleDB. The whole idea for an editor like this came from him, and I view the work on Depot as a continutation of that mission.
Depot is also open source. If you’re interested in contributing, you could see some issues and enhancements I’ve already outlined in the github repo here:
https://github.com/kkukshtel/Depot/issues
I’m also planning on filling out the wiki on Github with more specific detail about each of Depot’s parts, and will also make a video soon outlining its features.
Lastly, thanks to everyone who read the series of posts on building the editor! Happy to bring everyone along for this ride and be able to actually release something at the end of it! You can view the previous posts in the series here:
Part 1: Why?
Part 2: Custom Editors, Webviews, and Svelte
Part 3: Getting Data into Svelte
Part 4: Editing Data in Svelte
Download Depot here:
https://marketplace.visualstudio.com/items?itemName=afterschool.depot
Published on October 11, 2020.