feat: allow download of current project

This commit is contained in:
Carlos Valente
2024-10-03 22:26:59 +02:00
committed by Carlos Valente
parent cfb76153a0
commit f1cac8d1c4
3 changed files with 22 additions and 0 deletions
@@ -51,6 +51,13 @@ function init() {
ensureDirectory(resolveCorruptDirectory);
}
export async function getCurrentProject() {
const filename = await getLastLoadedProject();
const pathToFile = getPathToProject(filename);
return { filename, pathToFile };
}
/**
* Private function loads a demo project
* to be composed in the loading functions