zugzbot 1.0.1 → 1.0.2
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/init.js +7 -4
- package/package.json +1 -1
package/bin/init.js
CHANGED
|
@@ -27,11 +27,14 @@ const itemsToCopy = [
|
|
|
27
27
|
{ name: 'tui.json', src: join(pkgRoot, 'tui.json'), dest: join(targetDir, 'tui.json'), type: 'file' }
|
|
28
28
|
];
|
|
29
29
|
|
|
30
|
-
// Helper to filter out node_modules and .git files
|
|
30
|
+
// Helper to filter out node_modules and .git files relative to the package root
|
|
31
31
|
const filterFunc = (srcPath) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const relativeSrc = relative(pkgRoot, srcPath);
|
|
33
|
+
const isIgnored = relativeSrc.split(/[/\\]/).some(part =>
|
|
34
|
+
part === 'node_modules' ||
|
|
35
|
+
part === '.git' ||
|
|
36
|
+
part === '.openspec'
|
|
37
|
+
);
|
|
35
38
|
return !isIgnored;
|
|
36
39
|
};
|
|
37
40
|
|