bradfrost / patternlab

Make a pattern library using atomic design.
854 stars 116 forks source link

exclude .svn and .git from the pattern inc() function #8

Closed amclin closed 11 years ago

amclin commented 11 years ago

This is a weird bug. On Windows systems, if this project is included in an SVN project, the inc() function will parse the cached file originals in the .svn folder instead of locally modified files. As a result, any atoms/molecules/organisms loaded through the inc() function won't display any local modifications.

This commit adds an Exclude Filter to the recursive directory scanner so that .svn and .git folders are excluded. It also makes it easier to add additional path-based filters for excluding from the inc() scanner.

dmolsen commented 11 years ago

I want to pull this patch locally before merging. I just want to triple-check it. Should be done this evening.

amclin commented 11 years ago

This bug won't show up on a Mac (and presumably other Unix environments), because the inc() function is doing lazy matching to the first found result. On a Windows filesystem, .svn folder sorts before others, whereas on OSX the .svn folder will sort after regular files.