Prevent copying negated directories
mvillaizan opened this issue · 2 comments
The following filter copies everything and excludes everything correctly, but it still copies the "extra" directory:
filter: [
'**/*',
'!logs/**',
'!node_modules/**',
'!public/audio/uploads/**',
'!extra',
'!*.lnk'
]
At the moment we can only prevent to copy the contents of extra but not the directory itself by using:
filter: [
'**/*',
'!logs/**',
'!node_modules/**',
'!public/audio/uploads/**',
'!extra/**',
'!*.lnk'
]
Any way we can do this and not copy the folder at all?
Thanks.
N.B. this can be achieved by filtering out both the directory and its contents - i.e. both !extra
and !extra/**
filter: [
'**/*',
'!logs/**',
'!node_modules/**',
'!public/audio/uploads/**',
'!extra',
'!extra/**',
'!*.lnk'
]
@timkendrick meh, looks like using of globby
+ recursive-copy
brokes in such cases, cause u need to transform somehow all globby results to filter(
Do u have any recommendations on how to transform globby
results to filter prop?
UPD. ooops i think i can run globby in src folder and then pass result in filter prop, sry for spam