capaj / require-globify

transform for browserify, which allows to require files with globbing expressions
MIT License
70 stars 11 forks source link

Add exclude option #9

Closed majgis closed 9 years ago

majgis commented 9 years ago

I really want to put my specs as close as I can to what they are testing. Is there currently a way to exclude files from the glob? If not, it would be great to have an exclude option which would also have glob syntax and would exclude files from the group.

call-a3 commented 9 years ago

This is actually a great idea. How would you suggest this works?

I am leaning to expose the underlying glob-functionality and just pass on any options that are not require-globify-specific to node-glob.

majgis commented 9 years ago

I see that node-glob options has an ignore parameter that would work for what I want.

I suggest you just add an options parameter to your current object and pass whatever is set, which is less confusing than trying to distinguish parameters.

call-a3 commented 9 years ago

Fair enough, that also adds the benefit of eliminating the risk op future naming collisions (if/when they might occur). I'll implement it like that. Expect it to be in the next version which should come out somewhere in the next 48 hours. I'm using this time to also handle the other issues that have been piling up.

majgis commented 9 years ago

Sweet, thank you!

call-a3 commented 9 years ago

Took a while longer than expected, but should now be implemented. I'm deploying the new version when TravisCI comes back up (it's momentarily down for maintenance) and it gives the all-green.

majgis commented 9 years ago

This is great news, thank you! I will give it a try tomorrow.

majgis commented 9 years ago

I added this new feature to my project, and it worked like a charm. Thank you! I am now able to keep my spec's right next to what they test.