import path from 'path'; import fs from 'fs'; export function checkForCssFiles(dir: string): boolean { try { const files = fs.readdirSync(dir, { withFileTypes: true }); for (const file of files) { const fullPath = path.join(dir, file.name); if (file.isDirectory()) { if (file.name === 'node_modules') continue; if (checkForCssFiles(fullPath)) return true; } else if (file.name.endsWith('.css')) { return true; } } } catch (error) { console.error(`Ошибка при проверке директории ${dir}:`, error); return false; } return false; }