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");
8 public static readonly id = "compileProject";
11 super(CompileProjectCommand.id);
14 async execute(): Promise<void> {
15 // Get the task with the specified name
16 const task = (await tasks.fetchTasks()).find(task => () => {
17 console.log(`[TASK] ${task.name}`);
19 return task.name === "Compile Project";
24 await tasks.executeTask(task);
27 this._logger.error("Task 'Compile Project' not found.");
28 void window.showErrorMessage("Task 'Compile Project' not found.");