Change when file listeners are registered in order to make cache invalidation work

This commit is contained in:
Ben Hollis 2014-05-30 22:04:32 -07:00
parent 096f5ee356
commit 0309753561

View file

@ -15,15 +15,17 @@ module Middleman
scoped_self = self scoped_self = self
@waiting_for_ready = true @waiting_for_ready = true
@app.before_configuration do
# Register file change callback # Register file change callback
@app.files.changed do |file| files.changed do |file|
scoped_self.touch_file(file) scoped_self.touch_file(file)
end end
# Register file delete callback # Register file delete callback
@app.files.deleted do |file| files.deleted do |file|
scoped_self.remove_file(file) scoped_self.remove_file(file)
end end
end
@app.ready do @app.ready do
scoped_self.waiting_for_ready = false scoped_self.waiting_for_ready = false