Test vault¶
test-vault/ is a local Obsidian vault for trying out the plugin. It is ignored by git,
so each developer keeps their own.
How hot reload works¶
npm run devrebuildsmain.jswhenever a source file changes.- After each successful build, and whenever
styles.cssormanifest.jsonchanges,esbuild.config.mjscopies those three files intotest-vault/.obsidian/plugins/dice-room/. - The Hot Reload plugin, installed in the vault,
watches plugin folders that contain a
.hotreloadfile and reloads them when they change. The build creates that file for you.
The copy step only runs if test-vault/ exists, so nothing changes for anyone without one.
Production builds never copy.
Setting it up¶
- Create
test-vault/, and inside it.obsidian/plugins/hot-reload/. - Download
main.jsandmanifest.jsonfrom the latest Hot Reload release into that folder. - Create
test-vault/.obsidian/community-plugins.jsoncontaining["dice-room", "hot-reload"]. - Run
npm run dev. - In Obsidian, open
test-vaultas a vault. When asked, trust the vault so community plugins can run.
Sample notes¶
Keep a note for each component and interaction, so a change can be checked by looking. Rolls and effects only run with the Dice view open and a room joined, so a Dice Room server needs to be running.