initailization on the POS
This commit is contained in:
29
remove_hover.js
Normal file
29
remove_hover.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function walk(dir) {
|
||||
let results = [];
|
||||
const list = fs.readdirSync(dir);
|
||||
list.forEach(function(file) {
|
||||
file = dir + '/' + file;
|
||||
const stat = fs.statSync(file);
|
||||
if (stat && stat.isDirectory()) {
|
||||
results = results.concat(walk(file));
|
||||
} else {
|
||||
if (file.endsWith('.tsx') || file.endsWith('.ts')) {
|
||||
results.push(file);
|
||||
}
|
||||
}
|
||||
});
|
||||
return results;
|
||||
}
|
||||
|
||||
const files = walk('./src');
|
||||
files.forEach(file => {
|
||||
let content = fs.readFileSync(file, 'utf8');
|
||||
if (content.includes('hover:')) {
|
||||
const newContent = content.replace(/hover:[\w\-\/]+/g, '');
|
||||
fs.writeFileSync(file, newContent, 'utf8');
|
||||
console.log(`Updated ${file}`);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user