I have a structure like this
target_files/
├──target1/
├──target2/
└──target3/
And I want to include only "target2" for example and exclude the other targets. How I write the spec.exclude_files?
I found this example for excluding files, but I can't understand how to write it for whole folders.
spec.exclude_files = '_private/**/*.{h,m}'
asked Jan 12, 2018 at 10:20
Alberto Schiariti
1,5992 gold badges15 silver badges32 bronze badges
2 Answers 2
spec.source_files = [ 'target_files/**' ]
spec.exclude_files = [ 'target_files/target1/**', 'target_files/target3/**' ]
or for the case you ask about, more simply:
spec.source_files = [ 'target_files/target2/**' ]
answered Jan 12, 2018 at 23:24
Paul Beusterien
29.8k8 gold badges92 silver badges156 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
Alberto Schiariti
My fault. I didn't explain that I must write it in an "exclude form", because that target2 is variable. I can't simply choose what to include, because tomorrow I can add a target3, target4... and I don't want to add things there. I only want to write something like "pick targetX and exclude all other targets".
default