Skip to content

Commit

Permalink
Support configurable .obsidian dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Apr 7, 2021
1 parent bd644cc commit 58d8c28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = class HotReload extends Plugin {
}

onFileChange(filename) {
if (!filename.startsWith(".obsidian/plugins/")) return;
if (!filename.startsWith(this.app.plugins.getPluginFolder()+"/")) return;
const path = filename.split("/");
const base = path.pop(), dir = path.pop();
if (path.length === 1 && dir === "plugins") return this.watch(filename);
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "hot-reload",
"name": "Hot Reload",
"version": "0.1.6",
"minAppVersion": "0.11.0",
"version": "0.1.7",
"minAppVersion": "0.11.13",
"description": "Automatically reload in-development plugins when their files are changed",
"isDesktopOnly": true
}

0 comments on commit 58d8c28

Please sign in to comment.