feat: gestione trattini verticali | come accordi e allineamento grafico

This commit is contained in:
David Frassi
2026-07-14 19:47:15 +02:00
parent ad9286002b
commit 0069c1a55f
25 changed files with 834 additions and 121 deletions
+34
View File
@@ -0,0 +1,34 @@
const fs = require('fs');
const path = require('path');
function walkDir(dir, callback) {
fs.readdirSync(dir).forEach(f => {
let dirPath = path.join(dir, f);
let isDirectory = fs.statSync(dirPath).isDirectory();
if (isDirectory) {
walkDir(dirPath, callback);
} else {
callback(dirPath);
}
});
}
const icons = new Set();
walkDir(path.join(__dirname, '../src/app'), (filePath) => {
if (filePath.endsWith('.html') || filePath.endsWith('.ts')) {
const content = fs.readFileSync(filePath, 'utf8');
// Match name="icon-name"
const nameMatches = content.matchAll(/name=["']([a-zA-Z0-9-]+)["']/g);
for (const match of nameMatches) {
icons.add(match[1]);
}
// Match [name]="... ? 'icon-a' : 'icon-b'"
const ternaryMatches = content.matchAll(/'([a-zA-Z0-9-]+-outline|[a-zA-Z0-9-]+-sharp|[a-zA-Z0-9-]+)'/g);
for (const match of ternaryMatches) {
icons.add(match[1]);
}
}
});
console.log(JSON.stringify(Array.from(icons).sort(), null, 2));