Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hot-reload plugin as submodule #477

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ docs/.obsidian/plugins/iron-vault
docs/.obsidian/workspace.json
# Tells obsidian what plugins are enabled
!test-vault/.obsidian/community-plugins.json
# This plugin should still be tracked by git.
# It might need updated at some point
!test-vault/.obsidian/hot-reload-master/*
# Include hot-reload plugin to be tracked by git.
# Note that negating an exclusion only works for a direct subdirectory,
# not deeper nested directories, i.e. plugins/ but not plugins/hot-reload/
# To include plugins/hot-reload/, we first need to include plugins/ itself,
# instantly exclude everything from it again, and then explicitly include
# its hot-reload/ subdirectory.
!test-vault/.obsidian/plugins
test-vault/.obsidian/plugins/*
!test-vault/.obsidian/plugins/hot-reload

# Don't track this folder. For random things to try.
# If it's important to test, add it somewhere where other
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "test-vault/.obsidian/plugins/hot-reload"]
path = test-vault/.obsidian/plugins/hot-reload
url = https://github.com/pjeby/hot-reload.git
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ in the [Ironsworn Discord](https://discord.gg/xTxmR9UZTC)

## Development

To get set up with the project, clone the repo first, then `pnpm i` (you have
To get set up with the project, clone the repo first (use `--recurse-submodules`
if you want the hot-reload plugin added, see below), then `pnpm i` (you have
to install `pnpm` specifically, yes). You can then build the production
version of the plugin with `pnpm build`.

To play around, you can run `pnpm dev`, which watches for code changes,
compiles, and then deploys into the test vault. You can open up the test-vault
in obsidian and, with the hot-reload plugin enabled, new updates will be
loaded automatically.
loaded automatically. The [hot-reload plugin](https://github.com/pjeby/hot-reload)
is added as a git submodule, so either use `git clone --recurse-submodules` or
run `git submodule update --init` if you already cloned the repo.

There is a `test-vault` included in the repo that can be used as a sandbox
during development.
Expand Down
2 changes: 1 addition & 1 deletion test-vault/.obsidian/plugins/hot-reload