Register new GenerateTree command

This commit is contained in:
Unarray 2023-08-23 15:44:26 +02:00
parent 34f5bfbe2f
commit 5877ff53ee

View file

@ -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);
}
};
}