balupton/docpad — Issue #97: Ignore hidden files in `docpad watch`
Author: barberboy
Created: 2011-11-03 20:51:09+00:00
State: open

In docpad 1.4.1, changes to hidden files (starting with '.') will cause docpad to regenerate when during `docpad watch`. I use vim for editing, and changes to its swp files will cause docpad to regenerate more frequently than necessary.

This may not be a problem in docpad v2. I noticed you were using a new watch library, so those issues may be resolved now.

In case you are still interested in patching version 1.4, it's just a matter of passing an 'ignore' option to watchTree.watchTree in lib/docpad.coffee, line 752:

watcher = watchTree.watchTree docpad.srcPath, ignore: '^\\.|~$'

This hides files that either start with '.' or end with '~' (similar to the filePathIgnored method).

Thanks!