diff --git a/src/FileTreeGenerator.ts b/src/FileTreeGenerator.ts index ddd02e3..2947fa7 100644 --- a/src/FileTreeGenerator.ts +++ b/src/FileTreeGenerator.ts @@ -1,6 +1,19 @@ +import { GenerateTree } from "#/commands/GenerateTree"; +import type { Command } from "obsidian"; import { Plugin } from "obsidian"; export default class FileTreeGenerator extends Plugin { + onload(): void { + this.addCommands( + new GenerateTree() + ); + } + + public addCommands = (...commands: Command[]): void => { + for (const command of commands) { + this.addCommand(command); + } + }; } \ No newline at end of file