Make FS paths configurable

This commit is contained in:
Alex Gleason committed 2025-10-23 14:50:05 -05:00
1 parent f89a481c9c
commit d75bd386aa
43 files changed
+393 -124

No files matched your search

+3 -1
View File
@@ -1,17 +1,19 @@
import { useMutation } from "@tanstack/react-query";
import { buildProject } from "@/lib/build";
import { useFS } from "./useFS";
import { useFSPaths } from "./useFSPaths";
import { useAppContext } from "./useAppContext";
export function useBuildProject(projectId: string) {
const { fs } = useFS();
const { projectsPath } = useFSPaths();
const { config } = useAppContext();
return useMutation({
mutationFn: async () => {
return await buildProject({
fs,
projectPath: `/projects/${projectId}`,
projectPath: `${projectsPath}/${projectId}`,
domParser: new DOMParser(),
esmUrl: config.esmUrl,
});