2024-08-18 13:36:28 +00:00
|
|
|
// Assuming that each command class has a similar interface that includes an execute method.
|
2024-10-08 18:33:14 +00:00
|
|
|
import { CreateHandlebarsCommand } from './CreateHandlebarsCommand';
|
2024-08-18 13:36:28 +00:00
|
|
|
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),
|
2024-10-08 18:33:14 +00:00
|
|
|
new CreateHandlebarsCommand(app, manifest),
|
2024-08-18 13:36:28 +00:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async execute(): Promise<void> {
|
|
|
|
|
for (const command of this.commands) {
|
|
|
|
|
await command.execute();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|