middleman/middleman — pull request #1228 by tdreyno (2014-03-26 00:05:53+00:00)
Title: FileWatcher Refactor

This is a work-in-progress refactor of how the `FileWatcher` (the public API that Sitemap builds upon) decides which files are relevant.

Before, there was a single list of ignore regexes. This meant we constantly had to add new items to avoid processing stuff we shouldn't (`node_modules`, swap files, etc).

Now, there is an opt-in list (`source`, `lib`, `data`, `locales`, etc) AND an opt-out (git, swap files, etc).

The opt-in items can now be either a regex OR a Proc. The Proc lets us keep the list up to date when items are based on config values (`source`, `data_dir`, etc).

It it also possible to add new ignores and watchers from `config.rb`. I'm not happy with the naming of these methods, but for now, they are:

```
watcher_add :xml_stuff, /^xml/.*\.xml$/
ignore_add :subversion, /\.svn/
```

Would love some input, @bhollis @karlfreeman