Skip to content

Commit

Permalink
Refactor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaoumov committed Sep 15, 2024
1 parent 5882d8d commit d33fb15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/obsidian/Plugin/UIComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ interface ValidatorElement {
* Options for binding a value component to a plugin setting.
*/
interface BindUIComponentOptions<PluginSettings, UIValueType> {
// 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;

/**
Expand Down
3 changes: 0 additions & 3 deletions src/scripts/esbuild/copyToObsidianPluginsFolderPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit d33fb15

Please sign in to comment.