make little runtime as bin that loads in this dir so npx will work
This resolves #1
I just added a simple CLI that uses serve to serve the directory of the project, so if you publish, you can do this, without installing or having git (as long as you have node installed):
npx tilemap-editor
Additionally, you can install it globally and use it:
npm i -g tilemap-editor
tilemap-editor
Thank you for making a pr. Can you also add some instructions to the README as to how to pull it via npx?
Ok, done.
A bit unrelated but I was wondering how hard it would be to make this tool be able to automatically load maps and tilesets from a local directory, and to be able to save them via the server instead of manual file download.
My usecase would be to run this on a cloud IDE (e.g. Codespaces) and let you open the editor right in the browser. But since the files are all remote it would be cool if the editor could save files via the web server:
tilemap-editor --map assets/maps.json --tileset assets/tileset.png
Anyway, maybe this is just my personal use case, feel free to ignore. :)
@zommerfelds It's been a couple years since I made this (unmerged) PR. The idea here is it just runs a little web-server, so the tilemap-editor web-app itself would need a way to preload assets, like based on a URL-hash or something.