]> Git Repo - pico-vscode.git/blob - src/commands/compileProject.mts
Removed reload VS Code warning
[pico-vscode.git] / src / commands / compileProject.mts
1 import { tasks, window } from "vscode";
2 import { Command } from "./command.mjs";
3 import Logger from "../logger.mjs";
4
5 export default class CompileProjectCommand extends Command {
6   private _logger: Logger = new Logger("CompileProjectCommand");
7
8   constructor() {
9     super("compileProject");
10   }
11
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}`);
16
17       return task.name === "Compile Project";
18     });
19
20     if (task) {
21       // Execute the task
22       await tasks.executeTask(task);
23     } else {
24       // Task not found
25       this._logger.error("Task 'Compile Project' not found.");
26       void window.showErrorMessage("Task 'Compile Project' not found.");
27     }
28
29     return;
30   }
31 }
This page took 0.025166 seconds and 4 git commands to generate.