mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-02 21:49:42 +02:00
fix(image-watcher): detect images in subdirectories
Removed depth:0 restriction so images saved in src/, assets/, etc. are detected. Added filtering for node_modules, .git, dist, .next for performance. chore: bump version to 0.1407 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -152,10 +152,13 @@ export class ImageWatcher extends EventEmitter {
|
||||
stabilityThreshold: STABILITY_THRESHOLD_MS,
|
||||
pollInterval: POLL_INTERVAL_MS,
|
||||
},
|
||||
// Only watch files at the top level (not subdirectories)
|
||||
depth: 0,
|
||||
// Ignore non-image files early for performance
|
||||
// Watch all subdirectories (images may be saved in src/, assets/, etc.)
|
||||
// Ignore common heavy directories for performance
|
||||
ignored: (path: string) => {
|
||||
// Skip node_modules, .git, and other heavy directories
|
||||
if (path.includes('/node_modules/') || path.includes('/.git/') || path.includes('/dist/') || path.includes('/.next/')) {
|
||||
return true;
|
||||
}
|
||||
const ext = extname(path).toLowerCase();
|
||||
// Don't ignore directories (needed for watching to work)
|
||||
// Ignore files that aren't images
|
||||
|
||||
Reference in New Issue
Block a user