|
14 | 14 | '.npm', |
15 | 15 | '.yarn', |
16 | 16 | 'bower_components', |
| 17 | + |
17 | 18 | // Version Control |
18 | 19 | '.git', |
19 | 20 | '.svn', |
20 | 21 | '.hg', |
| 22 | + '.gitignore', |
| 23 | + |
21 | 24 | // Python |
22 | 25 | '__pycache__', |
23 | 26 | '.pytest_cache', |
|
33 | 36 | 'build', |
34 | 37 | '*.egg-info', |
35 | 38 | '.eggs', |
| 39 | + 'site-packages', |
| 40 | + |
36 | 41 | // Java/Spring Boot/Maven/Gradle |
37 | 42 | 'target', |
38 | 43 | 'build', |
|
45 | 50 | 'generated', |
46 | 51 | 'generated-sources', |
47 | 52 | 'generated-test-sources', |
48 | | - // IDE Files |
| 53 | + '.apt_generated', |
| 54 | + '.apt_generated_tests', |
| 55 | + |
| 56 | + // IDE Files (VS Code, IntelliJ, Eclipse, etc.) |
49 | 57 | '.vscode', |
50 | 58 | '.idea', |
51 | 59 | '.eclipse', |
52 | 60 | '.settings', |
53 | 61 | '.classpath', |
54 | 62 | '.project', |
55 | 63 | '.factorypath', |
56 | | - '.apt_generated', |
57 | | - '.apt_generated_tests', |
58 | 64 | 'nbproject', |
59 | 65 | '.nb-gradle', |
60 | | - // JavaScript/TypeScript |
| 66 | + '.vs', |
| 67 | + '.vscode-test', |
| 68 | + '*.iml', |
| 69 | + |
| 70 | + // JavaScript/TypeScript Build |
61 | 71 | '.next', |
62 | 72 | '.nuxt', |
63 | 73 | '.output', |
|
67 | 77 | 'dist', |
68 | 78 | 'coverage', |
69 | 79 | '.nyc_output', |
| 80 | + 'build', |
| 81 | + 'public/build', |
| 82 | + '.webpack', |
| 83 | + |
70 | 84 | // PHP |
71 | 85 | 'vendor', |
| 86 | + |
| 87 | + // Ruby |
| 88 | + '.bundle', |
| 89 | + |
72 | 90 | // Logs & Temp |
73 | 91 | 'logs', |
74 | 92 | 'temp', |
75 | 93 | 'tmp', |
76 | 94 | '.log', |
| 95 | + '.tmp', |
| 96 | + |
77 | 97 | // OS |
78 | 98 | '.DS_Store', |
79 | | - 'Thumbs.db' |
| 99 | + 'Thumbs.db', |
| 100 | + 'desktop.ini', |
| 101 | + |
| 102 | + // Other |
| 103 | + 'coverage', |
| 104 | + '.sass-cache', |
| 105 | + '.eslintcache' |
80 | 106 | ]), |
| 107 | + |
81 | 108 | exts: new Set([ |
82 | 109 | // Executables & Binaries |
83 | | - 'exe', 'dll', 'so', 'dylib', 'a', 'o', 'obj', |
| 110 | + 'exe', 'dll', 'so', 'dylib', 'a', 'o', 'obj', 'bin', |
| 111 | + |
84 | 112 | // Java Compiled |
85 | | - 'class', |
| 113 | + 'class', 'jar', 'war', 'ear', |
| 114 | + |
86 | 115 | // Python Compiled |
87 | 116 | 'pyc', 'pyo', 'pyd', |
88 | | - // Media |
89 | | - 'mp4', 'mp3', 'wav', 'avi', 'mov', 'flv', 'wmv', 'ogg', |
| 117 | + |
| 118 | + // Images (CRITICAL: These appear as binary in output!) |
| 119 | + 'png', 'jpg', 'jpeg', 'gif', 'bmp', 'ico', 'webp', 'svg', 'tiff', 'psd', 'ai', |
| 120 | + |
| 121 | + // Media (Videos, Audio) |
| 122 | + 'mp4', 'mp3', 'wav', 'avi', 'mov', 'flv', 'wmv', 'ogg', 'webm', 'mkv', 'flac', 'aac', |
| 123 | + |
90 | 124 | // Archives |
91 | | - 'zip', 'tar', 'gz', 'rar', '7z', 'bz2', 'xz', 'tgz', |
| 125 | + 'zip', 'tar', 'gz', 'rar', '7z', 'bz2', 'xz', 'tgz', 'iso', |
| 126 | + |
92 | 127 | // Fonts |
93 | 128 | 'ttf', 'woff', 'woff2', 'eot', 'otf', |
94 | | - // Other |
95 | | - 'log', 'cache', 'swp', 'swo', 'bak', 'tmp' |
| 129 | + |
| 130 | + // Documents (Binary formats) |
| 131 | + 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', |
| 132 | + |
| 133 | + // Database |
| 134 | + 'db', 'sqlite', 'sqlite3', |
| 135 | + |
| 136 | + // Minified/Compiled (CRITICAL: Skip compiled code!) |
| 137 | + 'min.js', 'min.css', 'bundle.js', 'chunk.js', |
| 138 | + |
| 139 | + // Logs & Cache |
| 140 | + 'log', 'cache', 'swp', 'swo', 'bak', 'tmp', |
| 141 | + |
| 142 | + // Lock files |
| 143 | + 'lock', |
| 144 | + |
| 145 | + // IDE specific |
| 146 | + 'iml', 'ipr', 'iws' |
96 | 147 | ]) |
97 | 148 | }; |
98 | 149 | // Download the bundled Python script (combine.py) and notify user to update paths |
|
444 | 495 | } |
445 | 496 | return r; |
446 | 497 | }; |
447 | | - const ign = p => { const pts = p.split('/'); if (pts.some(x => IGNORED.folders.has(x))) return true; const e = pts[pts.length - 1].split('.').pop().toLowerCase(); return IGNORED.exts.has(e); }; |
| 498 | + // Enhanced ignore function with better detection |
| 499 | + const ign = p => { |
| 500 | + const pts = p.split('/'); |
| 501 | + |
| 502 | + // Check if path contains ignored folders |
| 503 | + if (pts.some(x => IGNORED.folders.has(x))) return true; |
| 504 | + |
| 505 | + const filename = pts[pts.length - 1].toLowerCase(); |
| 506 | + |
| 507 | + // Check for minified files (CRITICAL: Skip .min.js, .min.css, etc.) |
| 508 | + if (filename.includes('.min.')) return true; |
| 509 | + if (filename.includes('.bundle.')) return true; |
| 510 | + if (filename.includes('.chunk.')) return true; |
| 511 | + |
| 512 | + // Check for specific IDE files |
| 513 | + if (filename.startsWith('.') && filename !== '.gitignore') { |
| 514 | + // Allow some dotfiles but skip most |
| 515 | + const allowed = ['.env.example', '.editorconfig', '.prettierrc']; |
| 516 | + if (!allowed.some(a => filename.includes(a))) return true; |
| 517 | + } |
| 518 | + |
| 519 | + // Check extension |
| 520 | + const e = filename.split('.').pop().toLowerCase(); |
| 521 | + return IGNORED.exts.has(e); |
| 522 | + }; |
| 523 | + |
448 | 524 | const isBinary = filename => { |
449 | 525 | const ext = filename.split('.').pop().toLowerCase(); |
450 | 526 | return BINARY_EXTS.has(ext); |
451 | 527 | }; |
| 528 | + |
| 529 | + // Check if file is likely minified/compiled (additional safety check) |
| 530 | + const isMinified = filename => { |
| 531 | + const lower = filename.toLowerCase(); |
| 532 | + return lower.includes('.min.') || |
| 533 | + lower.includes('.bundle.') || |
| 534 | + lower.includes('.chunk.') || |
| 535 | + lower.endsWith('.map'); // source maps |
| 536 | + }; |
452 | 537 | // Get icon for file or folder |
453 | 538 | const ico = (name, isFolder) => { |
454 | 539 | if (isFolder) { |
|
669 | 754 | // ======================================== |
670 | 755 | const ext = name.split('.').pop().toLowerCase(); |
671 | 756 | const iconData = ICONS[ext] || ICONS['default']; |
| 757 | + // Add specific class for better CSS targeting and visual effects |
| 758 | + let specificClass = `${ext}-icon`; |
| 759 | + // Group similar extensions for consistent styling |
| 760 | + if (['jsx', 'tsx'].includes(ext)) specificClass += ' react-icon'; |
| 761 | + if (['vue', 'svelte'].includes(ext)) specificClass += ' framework-icon'; |
| 762 | + if (['scss', 'sass', 'less'].includes(ext)) specificClass += ' style-icon'; |
| 763 | + |
672 | 764 | return { |
673 | 765 | type: 'svg', |
674 | 766 | url: ICON_BASE_URL + iconData.icon, |
675 | 767 | color: iconData.color, |
676 | | - cls: `${ext}-icon` |
| 768 | + cls: specificClass |
677 | 769 | }; |
678 | 770 | }; |
679 | 771 | const esc = s => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); |
|
0 commit comments