Skip to content

Conversation

@paton
Copy link
Contributor

@paton paton commented Sep 10, 2014

Fixes #8.

I did some light testing with this and things seem to work as expected, and new files are successfully detected and watched.

@nicjansma If you'd like to go this route, we can merge this instead of #7.

@paton paton changed the title Migrate over to use watch module to support detecting new files Migrate to "watch" module to support detecting new files Sep 10, 2014
@paton paton changed the title Migrate to "watch" module to support detecting new files Migrate to "watch" module for new file detection Sep 10, 2014
@paton
Copy link
Contributor Author

paton commented Sep 10, 2014

For an explanation of the logic within compileOnChange, check out the example in the watch module readme:
https://github.com/mikeal/watch#watchwatchtreeroot-options-callback

@paton
Copy link
Contributor Author

paton commented Sep 10, 2014

One issue with this: there's a (possible) bug in the watch module that causes the filter regex to only be applied on the initial walk, but not to new files, so if you create a non-handlebars file in the watched directory, it will trigger a do().

Just submitted a pull request to the watch module mikeal/watch#62

nicjansma added a commit that referenced this pull request Sep 13, 2014
Migrate to "watch" module for new file detection
@nicjansma nicjansma merged commit 62cc9bd into nicjansma:master Sep 13, 2014
@nicjansma
Copy link
Owner

This looks great, thanks paton!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New files aren't watched

2 participants