Files
Weightlifting_App/script.js
T

18 lines
442 B
JavaScript

const fs = require('fs');
const path = require('path');
const projectFilesToDelete = ['.flowconfig', 'App.js', '__tests__/App-test.js'];
const deleteFile = filePath => {
if (!fs.existsSync(filePath)) {
return;
}
fs.unlinkSync(filePath);
};
const projectPath = path.join(__dirname, '..', '..');
const deleteProjectFile = fileName => deleteFile(path.join(projectPath, fileName));
projectFilesToDelete.forEach(deleteProjectFile);