onlyworlds_obsidian-plugin/Commands/CreateCoreFilesCommand.ts
2024-10-08 20:33:14 +02:00

29 lines
1,021 B
TypeScript

// Assuming that each command class has a similar interface that includes an execute method.
import { CreateHandlebarsCommand } from './CreateHandlebarsCommand';
import { CreateReadmeCommand } from './CreateReadmeCommand';
import { CreateSettingsCommand } from './CreateSettingsCommand';
import { CreateTemplatesCommand } from './CreateTemplatesCommand';
export class CreateCoreFilesCommand {
private app: any;
private manifest: any;
private commands: Array<any>;
constructor(app: any, manifest: any) {
this.app = app;
this.manifest = manifest;
this.commands = [
new CreateReadmeCommand(app, manifest),
new CreateSettingsCommand(app, manifest),
new CreateTemplatesCommand(app, manifest),
new CreateHandlebarsCommand(app, manifest),
];
}
public async execute(): Promise<void> {
for (const command of this.commands) {
await command.execute();
}
}
}