mirror of
https://github.com/onlyworlds/obsidian-plugin.git
synced 2026-07-22 11:00:31 +00:00
29 lines
1,021 B
TypeScript
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();
|
|
}
|
|
}
|
|
}
|