From d33fb159990d679cb7cf6ca1b04f5250562c40b7 Mon Sep 17 00:00:00 2001 From: Michael Naumov Date: Sun, 15 Sep 2024 15:10:05 -0600 Subject: [PATCH] Refactor comments --- src/obsidian/Plugin/UIComponent.ts | 4 +++- src/scripts/esbuild/copyToObsidianPluginsFolderPlugin.ts | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/obsidian/Plugin/UIComponent.ts b/src/obsidian/Plugin/UIComponent.ts index d6bf972..fb55838 100644 --- a/src/obsidian/Plugin/UIComponent.ts +++ b/src/obsidian/Plugin/UIComponent.ts @@ -45,7 +45,9 @@ interface ValidatorElement { * Options for binding a value component to a plugin setting. */ interface BindUIComponentOptions { - // If true, saves the plugin settings automatically after the component value changes. Default is `true`. + /** + * If true, saves the plugin settings automatically after the component value changes. Default is `true`. + */ autoSave?: boolean; /** diff --git a/src/scripts/esbuild/copyToObsidianPluginsFolderPlugin.ts b/src/scripts/esbuild/copyToObsidianPluginsFolderPlugin.ts index d2ccc22..3542e6f 100644 --- a/src/scripts/esbuild/copyToObsidianPluginsFolderPlugin.ts +++ b/src/scripts/esbuild/copyToObsidianPluginsFolderPlugin.ts @@ -35,19 +35,16 @@ export function copyToObsidianPluginsFolderPlugin( name: 'copy-to-obsidian-plugins-folder', setup(build): void { build.onEnd(async () => { - // Skip copying during production build or if the Obsidian config directory is not provided if (isProductionBuild || !obsidianConfigDir) { return; } const pluginDir = join(obsidianConfigDir, 'plugins', pluginName); - // Create the plugin directory if it doesn't exist if (!existsSync(pluginDir)) { await mkdir(pluginDir); } - // Copy the built files to the plugin directory await cp(distDir, pluginDir, { recursive: true }); const hotReloadDir = join(obsidianConfigDir, 'plugins/hot-reload');