fix-index.js 367 B

12345678910
  1. const fs = require('fs');
  2. const path = require('path');
  3. const { openAndFix } = require('./helpers');
  4. const rootPath = path.join(__dirname, '..');
  5. const pathToIndex = path.join(rootPath, 'front-end', 'index.html');
  6. console.log('Fixing UI...');
  7. const fileContents = openAndFix(pathToIndex, 'utf8');
  8. fs.writeFileSync(pathToIndex, fileContents);
  9. console.log('...fixed');