UNPKG

@proofkit/typegen

Version:

`@proofkit/typegen` is a tool for generating TypeScript types from FileMaker database schemas, making it easier to work with FileMaker data in modern TypeScript projects.

22 lines (21 loc) 591 B
import { getFileInfo, format } from "prettier"; async function formatAndSaveSourceFiles(project) { try { const files = project.getSourceFiles(); for await (const file of files) { const filePath = file.getFilePath(); const fileInfo = await getFileInfo(filePath); if (fileInfo.ignored) continue; const formatted = await format(file.getFullText(), { filepath: filePath }); file.replaceWithText(formatted); } } catch (error) { } await project.save(); } export { formatAndSaveSourceFiles }; //# sourceMappingURL=formatting.js.map