Switched to writeFileSync when saving project to remove edge case where file might write multiple times
@@ -2,9 +2,7 @@ import fs from "fs-extra";
import path from "path";
const saveProjectData = async (projectPath, project) => {
- console.log("SAVING PROJECT TO ", projectPath);
- await fs.writeFile(projectPath, JSON.stringify(project, null, 4));
- console.log("WROTE TO ", projectPath);
+ fs.writeFileSync(projectPath, JSON.stringify(project, null, 4));
};
export default saveProjectData;
