Update linter and fix code style

This commit is contained in:
Djuri 2024-09-03 11:37:34 +02:00
parent 5594355b4c
commit 7b6a8cf10b
7 changed files with 101 additions and 133 deletions

View file

@ -10,7 +10,7 @@ const doRewrap = ({ cssClass }) => {
if (fs.existsSync(path.resolve(__dirname, 'dist/bundle.js'))) {
return;
}
} catch (e) {}
} catch {}
console.log('\nStart re-wrapping...');
fs.readFile(path.resolve(__dirname, 'dist/bundle.html'), 'utf8', function (err, data) {
if (!data) {
@ -36,10 +36,10 @@ const doRewrap = ({ cssClass }) => {
path.resolve(__dirname, 'dist/index.html'),
() => {}
);
} catch (e) {}
} catch {}
try {
fs.unlinkSync(path.resolve(__dirname, 'dist/bundle.html'));
} catch (e) {}
} catch {}
console.log('Finished: bundle.js + index.html have been regenerated.\n');
}
});