1 import { tasks, window } from "vscode";
2 import { Command } from "./command.mjs";
3 import Logger from "../logger.mjs";
5 export default class CompileProjectCommand extends Command {
6 private _logger: Logger = new Logger("CompileProjectCommand");
9 super("compileProject");
12 async execute(): Promise<void> {
13 // Get the task with the specified name
14 const task = (await tasks.fetchTasks()).find(task => () => {
15 console.log(`[TASK] ${task.name}`);
17 return task.name === "Compile Project";
22 await tasks.executeTask(task);
25 this._logger.error("Task 'Compile Project' not found.");
26 void window.showErrorMessage("Task 'Compile Project' not found.");