@vd7/eyecli 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/eye.js +12 -4
- package/package.json +1 -1
package/bin/eye.js
CHANGED
|
@@ -133,9 +133,13 @@ if (mode === 'files' || extensions.length > 0) {
|
|
|
133
133
|
cmdArgs.push('-e', ext);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
// Add excludes
|
|
136
|
+
// Add excludes (handle absolute vs relative paths)
|
|
137
137
|
for (const ex of excludes) {
|
|
138
|
-
|
|
138
|
+
if (ex.startsWith('/')) {
|
|
139
|
+
cmdArgs.push('--exclude', ex);
|
|
140
|
+
} else {
|
|
141
|
+
cmdArgs.push('--exclude', `*${ex}*`);
|
|
142
|
+
}
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
// Add pattern (use '.' as match-all if only extensions specified)
|
|
@@ -162,9 +166,13 @@ if (mode === 'files' || extensions.length > 0) {
|
|
|
162
166
|
if (includeBinary) cmdArgs.push('-a');
|
|
163
167
|
if (countMode) cmdArgs.push('-c');
|
|
164
168
|
|
|
165
|
-
// Add excludes
|
|
169
|
+
// Add excludes (handle absolute vs relative paths)
|
|
166
170
|
for (const ex of excludes) {
|
|
167
|
-
|
|
171
|
+
if (ex.startsWith('/')) {
|
|
172
|
+
cmdArgs.push('--glob', `!${ex}/**`);
|
|
173
|
+
} else {
|
|
174
|
+
cmdArgs.push('--glob', `!**/${ex}/**`);
|
|
175
|
+
}
|
|
168
176
|
}
|
|
169
177
|
|
|
170
178
|
cmdArgs.push(pattern, searchPath);
|