feat: add vitest, vite, move to tdd
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import * as path from "path";
|
||||
import * as vscode from "vscode";
|
||||
import { IConfigProvider } from "@/ports";
|
||||
|
||||
export class VscodeConfigProvider implements IConfigProvider {
|
||||
getProjectTaskPath(): string | undefined {
|
||||
const workspaceRoot = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath;
|
||||
if (!workspaceRoot) return undefined;
|
||||
|
||||
const config = vscode.workspace.getConfiguration("projectTasks");
|
||||
const relativePath = config.get<string>("projectPath") ?? ".vscode/tasks";
|
||||
return path.join(workspaceRoot, relativePath);
|
||||
}
|
||||
|
||||
getGlobalTaskPath(): string | undefined {
|
||||
const config = vscode.workspace.getConfiguration("projectTasks");
|
||||
return config.get<string>("globalPath") || undefined;
|
||||
}
|
||||
|
||||
getFileExtension(): string {
|
||||
const config = vscode.workspace.getConfiguration("projectTasks");
|
||||
return config.get<string>("fileExtension") ?? ".task.md";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user