react-automation-profiler
Version:
Automated React profiling and data visualization using React's Profiler API, Puppeteer, and D3.
21 lines • 611 B
JavaScript
import fs from 'fs';
import path from 'path';
import { MessageTypes, printMessage } from './util.js';
async function deleteJsonFiles(packagePath) {
try {
const files = await fs.readdirSync(packagePath);
for (const file of files) {
if (file.includes('.json')) {
fs.unlinkSync(path.join(packagePath, file));
}
}
}
catch (e) {
printMessage(MessageTypes.ERROR, {
e: e,
log: 'An error occurred while deleting JSON files.',
});
}
}
export { deleteJsonFiles };
//# sourceMappingURL=file.util.js.map