index changes
This commit is contained in:
16
find_empty_fonts.js
Normal file
16
find_empty_fonts.js
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const content = fs.readFileSync('c:/xampp/htdocs/doormileweb/assets/css/theme.css', 'utf8');
|
||||
|
||||
const fontFaceRegex = /@font-face\s*{([^}]*)}/g;
|
||||
let match;
|
||||
let count = 0;
|
||||
while ((match = fontFaceRegex.exec(content)) !== null) {
|
||||
const block = match[1];
|
||||
if (!block.includes('src:')) {
|
||||
console.log(`Found @font-face without src at index ${match.index}`);
|
||||
console.log(match[0]);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
console.log(`Total @font-face blocks: ${count}`);
|
||||
Reference in New Issue
Block a user