Files
ruoyi-plus-vben5-h/internal/node-utils/src/formatter.ts
2026-03-13 21:56:23 +08:00

14 lines
252 B
TypeScript

import fs from 'node:fs/promises';
import { execa } from 'execa';
async function formatFile(filepath: string) {
await execa('oxfmt', [filepath], {
stdio: 'inherit',
});
return await fs.readFile(filepath, 'utf8');
}
export { formatFile };