karlfreeman/middleman-sync — pull request #25 by manuelmeurer (2013-08-10 08:51:16+00:00)
Title: Register after_build hook on registration, not after configuration

As discussed here: http://forum.middlemanapp.com/t/order-of-after-build-callbacks/901
It makes sense that all extensions register their after_build hooks immediately when they are activated so the order in which the hooks are executed is the same as the order in which the extensions were activated.
Similar PR here: https://github.com/middleman/middleman-smusher/pull/5
Docs recommend it as well: http://middlemanapp.com/advanced/custom/#toc_9